
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>从零实现一个邮件收发客户端 · 高性能服务器开发 技术专栏</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="easy_coder">
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-chapter-fold/chapter-fold.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-prism/prism.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-anchor-navigation-ex/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-theme-fexa/fexa.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="从零开发一个WebSocket服务器.html" />
    
    
    <link rel="prev" href="从零实现一款12306刷票软件.html" />
    

    </head>
    <body>
        
<div class="book">
	<div class="header-inner">
		<!-- LOGO -->
		<div class="logo"></div>
		<span class="title"></span>

		<!-- Search -->
		
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>


		<!-- Nav -->
		<ul class="header-nav">
			
		</ul>
	</div>

	<div class="book-summary">
		<div class="book-summary-title">文档目录</div>
		
		
		<nav role="navigation">
			


<ul class="summary">
    
    

    

    
        
        <li class="header">Part I</li>
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../">
            
                <a href="../../">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../C++必知必会的知识点/">
            
                <a href="../C++必知必会的知识点/">
            
                    
                    C++必知必会的知识点
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../C++必知必会的知识点/如何成为一名合格的CC++开发者？.html">
            
                <a href="../C++必知必会的知识点/如何成为一名合格的CC++开发者？.html">
            
                    
                    如何成为一名合格的C/C++开发者？
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../C++必知必会的知识点/不定参数函数实现var_arg系列的宏.html">
            
                <a href="../C++必知必会的知识点/不定参数函数实现var_arg系列的宏.html">
            
                    
                    不定参数函数实现var_arg系列的宏
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../C++必知必会的知识点/你一定要搞明白的C函数调用方式与栈原理.html">
            
                <a href="../C++必知必会的知识点/你一定要搞明白的C函数调用方式与栈原理.html">
            
                    
                    你一定要搞明白的C函数调用方式与栈原理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="../C++必知必会的知识点/深入理解CC++中的指针.html">
            
                <a href="../C++必知必会的知识点/深入理解CC++中的指针.html">
            
                    
                    深入理解C/C++中的指针
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.5" data-path="../C++必知必会的知识点/详解C++11中的智能指针.html">
            
                <a href="../C++必知必会的知识点/详解C++11中的智能指针.html">
            
                    
                    详解C++11中的智能指针
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.6" data-path="../C++必知必会的知识点/C++17结构化绑定.html">
            
                <a href="../C++必知必会的知识点/C++17结构化绑定.html">
            
                    
                    C++17结构化绑定
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.7" data-path="../C++必知必会的知识点/C++必须掌握的pimpl惯用法.html">
            
                <a href="../C++必知必会的知识点/C++必须掌握的pimpl惯用法.html">
            
                    
                    C++必须掌握的pimpl惯用法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.8" data-path="../C++必知必会的知识点/用VisualStudio调试Linux程序.html">
            
                <a href="../C++必知必会的知识点/用VisualStudio调试Linux程序.html">
            
                    
                    用Visual Studio调试Linux程序
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.9" data-path="../C++必知必会的知识点/如何使用VisualStudio管理和阅读开源项目代码.html">
            
                <a href="../C++必知必会的知识点/如何使用VisualStudio管理和阅读开源项目代码.html">
            
                    
                    如何使用Visual Studio管理和阅读开源项目代码
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.10" data-path="../C++必知必会的知识点/利用cmake工具生成VisualStudio工程文件.html">
            
                <a href="../C++必知必会的知识点/利用cmake工具生成VisualStudio工程文件.html">
            
                    
                    利用cmake工具生成Visual Studio工程文件
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../多线程/">
            
                <a href="../多线程/">
            
                    
                    多线程
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../多线程/后台C++开发你一定要知道的条件变量.html">
            
                <a href="../多线程/后台C++开发你一定要知道的条件变量.html">
            
                    
                    后台C++开发你一定要知道的条件变量
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../多线程/整型变量赋值是原子操作吗？.html">
            
                <a href="../多线程/整型变量赋值是原子操作吗？.html">
            
                    
                    整型变量赋值是原子操作吗？
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="divider"></li>
        
        
    
        <li class="chapter " data-level="2.1" data-path="../网络编程/">
            
                <a href="../网络编程/">
            
                    
                    网络编程
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1.1" data-path="../网络编程/bind函数重难点解析.html">
            
                <a href="../网络编程/bind函数重难点解析.html">
            
                    
                    bind 函数重难点解析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.2" data-path="../网络编程/connect函数在阻塞和非阻塞模式下的行为.html">
            
                <a href="../网络编程/connect函数在阻塞和非阻塞模式下的行为.html">
            
                    
                    connect 函数在阻塞和非阻塞模式下的行为
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.3" data-path="../网络编程/select函数重难点解析.html">
            
                <a href="../网络编程/select函数重难点解析.html">
            
                    
                    select 函数重难点解析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.4" data-path="../网络编程/Linuxepoll模型（含LT模式和ET模式详解）.html">
            
                <a href="../网络编程/Linuxepoll模型（含LT模式和ET模式详解）.html">
            
                    
                    Linux epoll 模型（含LT 模式和 ET 模式详解）
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.5" data-path="../网络编程/socket的阻塞模式和非阻塞模式.html">
            
                <a href="../网络编程/socket的阻塞模式和非阻塞模式.html">
            
                    
                    socket 的阻塞模式和非阻塞模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.6" data-path="../网络编程/非阻塞模式下send和recv函数的返回值.html">
            
                <a href="../网络编程/非阻塞模式下send和recv函数的返回值.html">
            
                    
                    非阻塞模式下 send 和 recv 函数的返回值
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.7" data-path="../网络编程/服务器开发通信协议设计介绍.html">
            
                <a href="../网络编程/服务器开发通信协议设计介绍.html">
            
                    
                    服务器开发通信协议设计介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.8" data-path="../网络编程/TCP协议如何解决粘包、半包问题.html">
            
                <a href="../网络编程/TCP协议如何解决粘包、半包问题.html">
            
                    
                    TCP 协议如何解决粘包、半包问题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.9" data-path="../网络编程/网络通信中收发数据的正确姿势.html">
            
                <a href="../网络编程/网络通信中收发数据的正确姿势.html">
            
                    
                    网络通信中收发数据的正确姿势
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.10" data-path="../网络编程/服务器端发数据时，如果对端一直不收，怎么办？.html">
            
                <a href="../网络编程/服务器端发数据时，如果对端一直不收，怎么办？.html">
            
                    
                    服务器端发数据时，如果对端一直不收，怎么办？
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="divider"></li>
        
        
    
        <li class="chapter " data-level="3.1" data-path="../程序员必知必会的网络命令/">
            
                <a href="../程序员必知必会的网络命令/">
            
                    
                    程序员必知必会的网络命令
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1.1" data-path="../程序员必知必会的网络命令/利用telnet命令发电子邮件.html">
            
                <a href="../程序员必知必会的网络命令/利用telnet命令发电子邮件.html">
            
                    
                    利用telnet命令发电子邮件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.2" data-path="../程序员必知必会的网络命令/做Java或者C++开发都应该知道的lsof命令.html">
            
                <a href="../程序员必知必会的网络命令/做Java或者C++开发都应该知道的lsof命令.html">
            
                    
                    做Java或者C++开发都应该知道的lsof命令
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.3" data-path="../程序员必知必会的网络命令/Linux网络故障排查的瑞士军刀.html">
            
                <a href="../程序员必知必会的网络命令/Linux网络故障排查的瑞士军刀.html">
            
                    
                    Linux网络故障排查的瑞士军刀nc命令
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.4" data-path="../程序员必知必会的网络命令/Linuxtcpdump使用介绍.html">
            
                <a href="../程序员必知必会的网络命令/Linuxtcpdump使用介绍.html">
            
                    
                    Linux tcpdump使用详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.5" data-path="../程序员必知必会的网络命令/从抓包的角度分析connect函数的连接过程.html">
            
                <a href="../程序员必知必会的网络命令/从抓包的角度分析connect函数的连接过程.html">
            
                    
                    从抓包的角度分析connect函数的连接过程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.6" data-path="../程序员必知必会的网络命令/服务器开发中网络数据分析与故障排查经验漫谈.html">
            
                <a href="../程序员必知必会的网络命令/服务器开发中网络数据分析与故障排查经验漫谈.html">
            
                    
                    服务器开发中网络数据分析与故障排查经验漫谈
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="header">Part II</li>
        
        
    
        <li class="chapter " data-level="4.1" data-path="../高性能服务器框架设计/">
            
                <a href="../高性能服务器框架设计/">
            
                    
                    高性能服务器框架设计
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1.1" data-path="../高性能服务器框架设计/主线程与工作线程的分工.html">
            
                <a href="../高性能服务器框架设计/主线程与工作线程的分工.html">
            
                    
                    主线程与工作线程的分工
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.2" data-path="../高性能服务器框架设计/Reactor模式.html">
            
                <a href="../高性能服务器框架设计/Reactor模式.html">
            
                    
                    Reactor模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.3" data-path="../高性能服务器框架设计/实例：一个服务器程序的架构介绍.html">
            
                <a href="../高性能服务器框架设计/实例：一个服务器程序的架构介绍.html">
            
                    
                    实例：一个服务器程序的架构介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.4" data-path="../高性能服务器框架设计/错误码系统的设计.html">
            
                <a href="../高性能服务器框架设计/错误码系统的设计.html">
            
                    
                    错误码系统的设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.5" data-path="../高性能服务器框架设计/日志系统的设计.html">
            
                <a href="../高性能服务器框架设计/日志系统的设计.html">
            
                    
                    日志系统的设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.6" data-path="../高性能服务器框架设计/如何设计断线自动重连机制.html">
            
                <a href="../高性能服务器框架设计/如何设计断线自动重连机制.html">
            
                    
                    如何设计断线自动重连机制
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.7" data-path="../高性能服务器框架设计/心跳包机制设计详解.html">
            
                <a href="../高性能服务器框架设计/心跳包机制设计详解.html">
            
                    
                    心跳包机制设计详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.8" data-path="../高性能服务器框架设计/业务数据处理一定要单独开线程吗.html">
            
                <a href="../高性能服务器框架设计/业务数据处理一定要单独开线程吗.html">
            
                    
                    业务数据处理一定要单独开线程吗
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.9" data-path="../高性能服务器框架设计/C++高性能服务器网络框架设计细节.html">
            
                <a href="../高性能服务器框架设计/C++高性能服务器网络框架设计细节.html">
            
                    
                    C++ 高性能服务器网络框架设计细节
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="divider"></li>
        
        
    
        <li class="chapter " data-level="5.1" data-path="./">
            
                <a href="./">
            
                    
                    服务器开发案例实战
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.1.1" data-path="从零实现一个http服务器.html">
            
                <a href="从零实现一个http服务器.html">
            
                    
                    从零实现一个http服务器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.1.2" data-path="从零实现一款12306刷票软件.html">
            
                <a href="从零实现一款12306刷票软件.html">
            
                    
                    从零实现一款12306刷票软件
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="5.1.3" data-path="从零实现一个邮件收发客户端.html">
            
                <a href="从零实现一个邮件收发客户端.html">
            
                    
                    从零实现一个邮件收发客户端
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.1.4" data-path="从零开发一个WebSocket服务器.html">
            
                <a href="从零开发一个WebSocket服务器.html">
            
                    
                    从零开发一个WebSocket服务器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.1.5" data-path="1从一款多人联机实时对战游戏开始.html">
            
                <a href="1从一款多人联机实时对战游戏开始.html">
            
                    
                    从零学习开源项目系列（一） 从一款多人联机实时对战游戏开始
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.1.6" data-path="2最后一战概况.html">
            
                <a href="2最后一战概况.html">
            
                    
                    从零学习开源项目系列（二） 最后一战概况
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.1.7" data-path="3CSBattleMgr服务源码研究.html">
            
                <a href="3CSBattleMgr服务源码研究.html">
            
                    
                    从零学习开源项目系列（三） CSBattleMgr服务源码研究
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.1.8" data-path="4LogServer源码探究.html">
            
                <a href="4LogServer源码探究.html">
            
                    
                    从零学习开源项目系列（四）LogServer源码探究
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="header">Part III</li>
        
        
    
        <li class="chapter " data-level="6.1" data-path="../TeamTalk源码解析/">
            
                <a href="../TeamTalk源码解析/">
            
                    
                    TeamTalk IM源码分析
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.1.1" data-path="../TeamTalk源码解析/01TeamTalk介绍.html">
            
                <a href="../TeamTalk源码解析/01TeamTalk介绍.html">
            
                    
                    01 TeamTalk介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.1.2" data-path="../TeamTalk源码解析/02服务器端的程序的编译与部署.html">
            
                <a href="../TeamTalk源码解析/02服务器端的程序的编译与部署.html">
            
                    
                    02 服务器端的程序的编译与部署
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.1.3" data-path="../TeamTalk源码解析/03服务器端的程序架构介绍.html">
            
                <a href="../TeamTalk源码解析/03服务器端的程序架构介绍.html">
            
                    
                    03 服务器端的程序架构介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.1.4" data-path="../TeamTalk源码解析/04服务器端db_proxy_server源码分析.html">
            
                <a href="../TeamTalk源码解析/04服务器端db_proxy_server源码分析.html">
            
                    
                    04 服务器端db_proxy_server源码分析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.1.5" data-path="../TeamTalk源码解析/05服务器端msg_server源码分析.html">
            
                <a href="../TeamTalk源码解析/05服务器端msg_server源码分析.html">
            
                    
                    05 服务器端msg_server源码分析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.1.6" data-path="../TeamTalk源码解析/06服务器端login_server源码分析.html">
            
                <a href="../TeamTalk源码解析/06服务器端login_server源码分析.html">
            
                    
                    06 服务器端login_server源码分析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.1.7" data-path="../TeamTalk源码解析/07服务器端msfs源码分析.html">
            
                <a href="../TeamTalk源码解析/07服务器端msfs源码分析.html">
            
                    
                    07 服务器端msfs源码分析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.1.8" data-path="../TeamTalk源码解析/08服务器端file_server源码分析.html">
            
                <a href="../TeamTalk源码解析/08服务器端file_server源码分析.html">
            
                    
                    08 服务器端file_server源码分析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.1.9" data-path="../TeamTalk源码解析/09服务器端route_server源码分析.html">
            
                <a href="../TeamTalk源码解析/09服务器端route_server源码分析.html">
            
                    
                    09 服务器端route_server源码分析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.1.10" data-path="../TeamTalk源码解析/10开放一个TeamTalk测试服务器地址和几个测试账号.html">
            
                <a href="../TeamTalk源码解析/10开放一个TeamTalk测试服务器地址和几个测试账号.html">
            
                    
                    10 开放一个TeamTalk测试服务器地址和几个测试账号
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.1.11" data-path="../TeamTalk源码解析/11pc客户端源码分析.html">
            
                <a href="../TeamTalk源码解析/11pc客户端源码分析.html">
            
                    
                    11 pc客户端源码分析
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="divider"></li>
        
        
    
        <li class="chapter " data-level="7.1" data-path="../libevent源码深度剖析/">
            
                <a href="../libevent源码深度剖析/">
            
                    
                    libevent源码深度剖析
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="7.1.1" data-path="../libevent源码深度剖析/libevent源码深度剖析01.html">
            
                <a href="../libevent源码深度剖析/libevent源码深度剖析01.html">
            
                    
                    libevent源码深度剖析01
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.1.2" data-path="../libevent源码深度剖析/libevent源码深度剖析02.html">
            
                <a href="../libevent源码深度剖析/libevent源码深度剖析02.html">
            
                    
                    libevent源码深度剖析02
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.1.3" data-path="../libevent源码深度剖析/libevent源码深度剖析03.html">
            
                <a href="../libevent源码深度剖析/libevent源码深度剖析03.html">
            
                    
                    libevent源码深度剖析03
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.1.4" data-path="../libevent源码深度剖析/libevent源码深度剖析04.html">
            
                <a href="../libevent源码深度剖析/libevent源码深度剖析04.html">
            
                    
                    libevent源码深度剖析04
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.1.5" data-path="../libevent源码深度剖析/libevent源码深度剖析05.html">
            
                <a href="../libevent源码深度剖析/libevent源码深度剖析05.html">
            
                    
                    libevent源码深度剖析05
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.1.6" data-path="../libevent源码深度剖析/libevent源码深度剖析06.html">
            
                <a href="../libevent源码深度剖析/libevent源码深度剖析06.html">
            
                    
                    libevent源码深度剖析06
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.1.7" data-path="../libevent源码深度剖析/libevent源码深度剖析07.html">
            
                <a href="../libevent源码深度剖析/libevent源码深度剖析07.html">
            
                    
                    libevent源码深度剖析07
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.1.8" data-path="../libevent源码深度剖析/libevent源码深度剖析08.html">
            
                <a href="../libevent源码深度剖析/libevent源码深度剖析08.html">
            
                    
                    libevent源码深度剖析08
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.1.9" data-path="../libevent源码深度剖析/libevent源码深度剖析09.html">
            
                <a href="../libevent源码深度剖析/libevent源码深度剖析09.html">
            
                    
                    libevent源码深度剖析09
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.1.10" data-path="../libevent源码深度剖析/libevent源码深度剖析10.html">
            
                <a href="../libevent源码深度剖析/libevent源码深度剖析10.html">
            
                    
                    libevent源码深度剖析10
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.1.11" data-path="../libevent源码深度剖析/libevent源码深度剖析11.html">
            
                <a href="../libevent源码深度剖析/libevent源码深度剖析11.html">
            
                    
                    libevent源码深度剖析11
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.1.12" data-path="../libevent源码深度剖析/libevent源码深度剖析12.html">
            
                <a href="../libevent源码深度剖析/libevent源码深度剖析12.html">
            
                    
                    libevent源码深度剖析12
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.1.13" data-path="../libevent源码深度剖析/libevent源码深度剖析13.html">
            
                <a href="../libevent源码深度剖析/libevent源码深度剖析13.html">
            
                    
                    libevent源码深度剖析13
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="7.2" data-path="../leveldb源码分析/">
            
                <a href="../leveldb源码分析/">
            
                    
                    leveldb源码分析
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="7.2.1" data-path="../leveldb源码分析/leveldb源码分析1.html">
            
                <a href="../leveldb源码分析/leveldb源码分析1.html">
            
                    
                    leveldb源码分析1
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.2.2" data-path="../leveldb源码分析/leveldb源码分析2.html">
            
                <a href="../leveldb源码分析/leveldb源码分析2.html">
            
                    
                    leveldb源码分析2
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.2.3" data-path="../leveldb源码分析/leveldb源码分析3.html">
            
                <a href="../leveldb源码分析/leveldb源码分析3.html">
            
                    
                    leveldb源码分析3
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.2.4" data-path="../leveldb源码分析/leveldb源码分析4.html">
            
                <a href="../leveldb源码分析/leveldb源码分析4.html">
            
                    
                    leveldb源码分析4
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.2.5" data-path="../leveldb源码分析/leveldb源码分析5.html">
            
                <a href="../leveldb源码分析/leveldb源码分析5.html">
            
                    
                    leveldb源码分析5
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.2.6" data-path="../leveldb源码分析/leveldb源码分析6.html">
            
                <a href="../leveldb源码分析/leveldb源码分析6.html">
            
                    
                    leveldb源码分析6
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.2.7" data-path="../leveldb源码分析/leveldb源码分析7.html">
            
                <a href="../leveldb源码分析/leveldb源码分析7.html">
            
                    
                    leveldb源码分析7
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.2.8" data-path="../leveldb源码分析/leveldb源码分析8.html">
            
                <a href="../leveldb源码分析/leveldb源码分析8.html">
            
                    
                    leveldb源码分析8
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.2.9" data-path="../leveldb源码分析/leveldb源码分析9.html">
            
                <a href="../leveldb源码分析/leveldb源码分析9.html">
            
                    
                    leveldb源码分析9
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.2.10" data-path="../leveldb源码分析/leveldb源码分析10.html">
            
                <a href="../leveldb源码分析/leveldb源码分析10.html">
            
                    
                    leveldb源码分析10
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.2.11" data-path="../leveldb源码分析/leveldb源码分析11.html">
            
                <a href="../leveldb源码分析/leveldb源码分析11.html">
            
                    
                    leveldb源码分析11
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.2.12" data-path="../leveldb源码分析/leveldb源码分析12.html">
            
                <a href="../leveldb源码分析/leveldb源码分析12.html">
            
                    
                    leveldb源码分析12
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.2.13" data-path="../leveldb源码分析/leveldb源码分析13.html">
            
                <a href="../leveldb源码分析/leveldb源码分析13.html">
            
                    
                    leveldb源码分析13
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.2.14" data-path="../leveldb源码分析/leveldb源码分析14.html">
            
                <a href="../leveldb源码分析/leveldb源码分析14.html">
            
                    
                    leveldb源码分析14
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.2.15" data-path="../leveldb源码分析/leveldb源码分析15.html">
            
                <a href="../leveldb源码分析/leveldb源码分析15.html">
            
                    
                    leveldb源码分析15
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.2.16" data-path="../leveldb源码分析/leveldb源码分析16.html">
            
                <a href="../leveldb源码分析/leveldb源码分析16.html">
            
                    
                    leveldb源码分析16
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.2.17" data-path="../leveldb源码分析/leveldb源码分析17.html">
            
                <a href="../leveldb源码分析/leveldb源码分析17.html">
            
                    
                    leveldb源码分析17
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.2.18" data-path="../leveldb源码分析/leveldb源码分析18.html">
            
                <a href="../leveldb源码分析/leveldb源码分析18.html">
            
                    
                    leveldb源码分析18
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.2.19" data-path="../leveldb源码分析/leveldb源码分析19.html">
            
                <a href="../leveldb源码分析/leveldb源码分析19.html">
            
                    
                    leveldb源码分析19
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.2.20" data-path="../leveldb源码分析/leveldb源码分析20.html">
            
                <a href="../leveldb源码分析/leveldb源码分析20.html">
            
                    
                    leveldb源码分析20
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.2.21" data-path="../leveldb源码分析/leveldb源码分析21.html">
            
                <a href="../leveldb源码分析/leveldb源码分析21.html">
            
                    
                    leveldb源码分析21
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.2.22" data-path="../leveldb源码分析/leveldb源码分析22.html">
            
                <a href="../leveldb源码分析/leveldb源码分析22.html">
            
                    
                    leveldb源码分析22
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="divider"></li>
        
        
    
        <li class="chapter " data-level="8.1" data-path="../Memcached源码分析/">
            
                <a href="../Memcached源码分析/">
            
                    
                    Memcached源码分析
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="8.1.1" data-path="../Memcached源码分析/00服务器资源调整.html">
            
                <a href="../Memcached源码分析/00服务器资源调整.html">
            
                    
                    00 服务器资源调整
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="8.1.2" data-path="../Memcached源码分析/01初始化参数解析.html">
            
                <a href="../Memcached源码分析/01初始化参数解析.html">
            
                    
                    01 初始化参数解析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="8.1.3" data-path="../Memcached源码分析/02网络监听的建立.html">
            
                <a href="../Memcached源码分析/02网络监听的建立.html">
            
                    
                    02 网络监听的建立
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="8.1.4" data-path="../Memcached源码分析/03网络连接建立.html">
            
                <a href="../Memcached源码分析/03网络连接建立.html">
            
                    
                    03 网络连接建立
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="8.1.5" data-path="../Memcached源码分析/04内存初始化.html">
            
                <a href="../Memcached源码分析/04内存初始化.html">
            
                    
                    04 内存初始化
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="8.1.6" data-path="../Memcached源码分析/05资源初始化.html">
            
                <a href="../Memcached源码分析/05资源初始化.html">
            
                    
                    05 资源初始化
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="8.1.7" data-path="../Memcached源码分析/06get过程.html">
            
                <a href="../Memcached源码分析/06get过程.html">
            
                    
                    06 get过程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="8.1.8" data-path="../Memcached源码分析/07cas属性.html">
            
                <a href="../Memcached源码分析/07cas属性.html">
            
                    
                    07 cas属性
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="8.1.9" data-path="../Memcached源码分析/08内存池.html">
            
                <a href="../Memcached源码分析/08内存池.html">
            
                    
                    08 内存池
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="8.1.10" data-path="../Memcached源码分析/09连接队列.html">
            
                <a href="../Memcached源码分析/09连接队列.html">
            
                    
                    09 连接队列
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="8.1.11" data-path="../Memcached源码分析/10Hash表操作.html">
            
                <a href="../Memcached源码分析/10Hash表操作.html">
            
                    
                    10 Hash表操作
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="8.1.12" data-path="../Memcached源码分析/12set操作.html">
            
                <a href="../Memcached源码分析/12set操作.html">
            
                    
                    12 set操作
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="8.1.13" data-path="../Memcached源码分析/13do_item_alloc操作.html">
            
                <a href="../Memcached源码分析/13do_item_alloc操作.html">
            
                    
                    13 do_item_alloc操作
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="8.1.14" data-path="../Memcached源码分析/14item结构.html">
            
                <a href="../Memcached源码分析/14item结构.html">
            
                    
                    14 item结构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="8.1.15" data-path="../Memcached源码分析/15Hash表扩容.html">
            
                <a href="../Memcached源码分析/15Hash表扩容.html">
            
                    
                    15 Hash表扩容
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="8.1.16" data-path="../Memcached源码分析/16线程交互.html">
            
                <a href="../Memcached源码分析/16线程交互.html">
            
                    
                    16 线程交互
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="8.1.17" data-path="../Memcached源码分析/17状态机.html">
            
                <a href="../Memcached源码分析/17状态机.html">
            
                    
                    17 状态机
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="divider"></li>
        
        
    
        <li class="chapter " data-level="9.1" data-path="../游戏开发专题/">
            
                <a href="../游戏开发专题/">
            
                    
                    游戏开发专题
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="9.1.1" data-path="../游戏开发专题/1游戏服务器开发的基本体系与服务器端开发的一些建议.html">
            
                <a href="../游戏开发专题/1游戏服务器开发的基本体系与服务器端开发的一些建议.html">
            
                    
                    1 游戏服务器开发的基本体系与服务器端开发的一些建议
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="9.1.2" data-path="../游戏开发专题/2网络游戏服务器开发框架设计介绍.html">
            
                <a href="../游戏开发专题/2网络游戏服务器开发框架设计介绍.html">
            
                    
                    2 网络游戏服务器开发框架设计介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="9.1.3" data-path="../游戏开发专题/3游戏后端开发需要掌握的知识.html">
            
                <a href="../游戏开发专题/3游戏后端开发需要掌握的知识.html">
            
                    
                    3 游戏后端开发需要掌握的知识
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="9.1.4" data-path="../游戏开发专题/4关于游戏服务端架构的整理.html">
            
                <a href="../游戏开发专题/4关于游戏服务端架构的整理.html">
            
                    
                    4 关于游戏服务端架构的整理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="9.1.5" data-path="../游戏开发专题/5各类游戏对应的服务端架构.html">
            
                <a href="../游戏开发专题/5各类游戏对应的服务端架构.html">
            
                    
                    5 各类游戏对应的服务端架构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="9.1.6" data-path="../游戏开发专题/6从腾讯QQgame高性能服务器集群架构看“分而治之”与“自治”等分布式架构设计原则.html">
            
                <a href="../游戏开发专题/6从腾讯QQgame高性能服务器集群架构看“分而治之”与“自治”等分布式架构设计原则.html">
            
                    
                    6 从腾讯QQgame高性能服务器集群架构看“分而治之”与“自治”等分布式架构设计原则
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="9.1.7" data-path="../游戏开发专题/7QQ游戏百万人同时在线服务器架构实现.html">
            
                <a href="../游戏开发专题/7QQ游戏百万人同时在线服务器架构实现.html">
            
                    
                    7 QQ游戏百万人同时在线服务器架构实现
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="9.1.8" data-path="../游戏开发专题/8大型多人在线游戏服务器架构设计.html">
            
                <a href="../游戏开发专题/8大型多人在线游戏服务器架构设计.html">
            
                    
                    8 大型多人在线游戏服务器架构设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="9.1.9" data-path="../游戏开发专题/9百万用户级游戏服务器架构设计.html">
            
                <a href="../游戏开发专题/9百万用户级游戏服务器架构设计.html">
            
                    
                    9 百万用户级游戏服务器架构设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="9.1.10" data-path="../游戏开发专题/10十万在线的WebGame的数据库设计思路.html">
            
                <a href="../游戏开发专题/10十万在线的WebGame的数据库设计思路.html">
            
                    
                    10 十万在线的WebGame的数据库设计思路
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="9.1.11" data-path="../游戏开发专题/11一种高性能网络游戏服务器架构设计.html">
            
                <a href="../游戏开发专题/11一种高性能网络游戏服务器架构设计.html">
            
                    
                    11 一种高性能网络游戏服务器架构设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="9.1.12" data-path="../游戏开发专题/12经典游戏服务器端架构概述.html">
            
                <a href="../游戏开发专题/12经典游戏服务器端架构概述.html">
            
                    
                    12 经典游戏服务器端架构概述
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="9.1.13" data-path="../游戏开发专题/13游戏跨服架构进化之路.html">
            
                <a href="../游戏开发专题/13游戏跨服架构进化之路.html">
            
                    
                    13 游戏跨服架构进化之路
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="header">Part IV</li>
        
        
    
        <li class="chapter " data-level="10.1" data-path="../程序员面试题精讲/">
            
                <a href="../程序员面试题精讲/">
            
                    
                    程序员面试题精讲
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="10.1.1" data-path="../程序员面试题精讲/腾讯后台开发实习生技能要求.html">
            
                <a href="../程序员面试题精讲/腾讯后台开发实习生技能要求.html">
            
                    
                    腾讯后台开发实习生技能要求
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="10.1.2" data-path="../程序员面试题精讲/聊聊如何拿大厂的offer.html">
            
                <a href="../程序员面试题精讲/聊聊如何拿大厂的offer.html">
            
                    
                    聊聊如何拿大厂的 offer
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="10.1.3" data-path="../程序员面试题精讲/网络通信题目集锦.html">
            
                <a href="../程序员面试题精讲/网络通信题目集锦.html">
            
                    
                    网络通信题目集锦
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="10.1.4" data-path="../程序员面试题精讲/我面试后端开发经理的经历.html">
            
                <a href="../程序员面试题精讲/我面试后端开发经理的经历.html">
            
                    
                    我面试后端开发经理的经历
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="10.1.5" data-path="../程序员面试题精讲/LinuxCC++后端开发面试问哪些问题.html">
            
                <a href="../程序员面试题精讲/LinuxCC++后端开发面试问哪些问题.html">
            
                    
                    Linux C/C++后端开发面试问哪些问题
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="10.2" data-path="../职业规划/">
            
                <a href="../职业规划/">
            
                    
                    职业规划
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="10.2.1" data-path="../职业规划/给工作4年迷茫的程序员们的一点建议.html">
            
                <a href="../职业规划/给工作4年迷茫的程序员们的一点建议.html">
            
                    
                    给工作 4 年迷茫的程序员们的一点建议
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="10.2.2" data-path="../职业规划/聊聊技术人员的常见的职业问题.html">
            
                <a href="../职业规划/聊聊技术人员的常见的职业问题.html">
            
                    
                    聊聊技术人员的常见的职业问题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="10.2.3" data-path="../职业规划/写给那些傻傻想做服务器开发的朋友.html">
            
                <a href="../职业规划/写给那些傻傻想做服务器开发的朋友.html">
            
                    
                    写给那些傻傻想做服务器开发的朋友
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="10.3" data-path="../自我提升与开源代码/">
            
                <a href="../自我提升与开源代码/">
            
                    
                    自我提升与开源代码
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="10.3.1" data-path="../自我提升与开源代码/2020年好好读一读开源代码吧.html">
            
                <a href="../自我提升与开源代码/2020年好好读一读开源代码吧.html">
            
                    
                    2020 年好好读一读开源代码吧
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="10.4" data-path="../后端开发相关的书籍/">
            
                <a href="../后端开发相关的书籍/">
            
                    
                    后端开发相关的书籍
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="10.4.1" data-path="../后端开发相关的书籍/后台开发应该读的书.html">
            
                <a href="../后端开发相关的书籍/后台开发应该读的书.html">
            
                    
                    后台开发应该读的书
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="10.5" data-path="../程序员的简历/">
            
                <a href="../程序员的简历/">
            
                    
                    程序员的简历
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="10.5.1" data-path="../程序员的简历/程序员如何写简历.html">
            
                <a href="../程序员的简历/程序员如何写简历.html">
            
                    
                    程序员如何写简历
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="10.6" data-path="../程序员的薪资与年终奖那些事儿/">
            
                <a href="../程序员的薪资与年终奖那些事儿/">
            
                    
                    程序员的薪资与年终奖那些事儿
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="10.6.1" data-path="../程序员的薪资与年终奖那些事儿/技术面试与HR谈薪资技巧.html">
            
                <a href="../程序员的薪资与年终奖那些事儿/技术面试与HR谈薪资技巧.html">
            
                    
                    技术面试与HR谈薪资技巧
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="10.6.2" data-path="../程序员的薪资与年终奖那些事儿/聊一聊程序员如何增加收入.html">
            
                <a href="../程序员的薪资与年终奖那些事儿/聊一聊程序员如何增加收入.html">
            
                    
                    聊一聊程序员如何增加收入
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="10.6.3" data-path="../程序员的薪资与年终奖那些事儿/谈一谈年终奖.html">
            
                <a href="../程序员的薪资与年终奖那些事儿/谈一谈年终奖.html">
            
                    
                    谈一谈年终奖
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="10.7" data-path="../程序员的烦心事/">
            
                <a href="../程序员的烦心事/">
            
                    
                    程序员的烦心事
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="10.7.1" data-path="../程序员的烦心事/拒绝了一家公司的offer后，他们的副总和hr总监同时打电话来询问拒绝原因并极力要求加入，我该不该去？.html">
            
                <a href="../程序员的烦心事/拒绝了一家公司的offer后，他们的副总和hr总监同时打电话来询问拒绝原因并极力要求加入，我该不该去？.html">
            
                    
                    拒绝了一家公司的offer后，他们的副总和hr总监同时打电话来询问拒绝原因并极力要求加入，我该不该去？
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="10.7.2" data-path="../程序员的烦心事/我是一名程序员，结婚时女友要求我用两年的工资作为彩礼，我该不该答应？.html">
            
                <a href="../程序员的烦心事/我是一名程序员，结婚时女友要求我用两年的工资作为彩礼，我该不该答应？.html">
            
                    
                    我是一名程序员，结婚时女友要求我用两年的工资作为彩礼，我该不该答应？
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="10.8" data-path="../作者的故事/">
            
                <a href="../作者的故事/">
            
                    
                    作者的故事
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="10.8.1" data-path="../作者的故事/我的2019.html">
            
                <a href="../作者的故事/我的2019.html">
            
                    
                    我的 2019
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="10.8.2" data-path="../作者的故事/我是如何年薪五十万的.html">
            
                <a href="../作者的故事/我是如何年薪五十万的.html">
            
                    
                    我是如何年薪五十万的
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


		</nav>
		
		
	</div>

	<!-- Content nav -->
	<div class="book-anchor">
		<div class="book-anchor-title">在这篇文章中:</div>
		<div class="book-anchor-body">

		</div>
	</div>

	<div class="book-body">
		
		<div class="body-inner">
			
			

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >从零实现一个邮件收发客户端</a>
    </h1>
</div>




			<div class="page-wrapper" tabindex="-1" role="main">
				<div class="page-inner">
					
<div id="book-search-results">
    <div class="search-noresults">
    
					<section class="normal markdown-section">
						
						<div id="anchor-navigation-ex-navbar"><i class="fa fa-navicon"></i><ul><ul><li><span class="title-icon "></span><a href="#&#x4ECE;&#x96F6;&#x5B9E;&#x73B0;&#x4E00;&#x4E2A;&#x90AE;&#x4EF6;&#x6536;&#x53D1;&#x5BA2;&#x6237;&#x7AEF;"><b></b>&#x4ECE;&#x96F6;&#x5B9E;&#x73B0;&#x4E00;&#x4E2A;&#x90AE;&#x4EF6;&#x6536;&#x53D1;&#x5BA2;&#x6237;&#x7AEF;</a></li></ul></ul></div><h2 id="&#x4ECE;&#x96F6;&#x5B9E;&#x73B0;&#x4E00;&#x4E2A;&#x90AE;&#x4EF6;&#x6536;&#x53D1;&#x5BA2;&#x6237;&#x7AEF;"><a name="&#x4ECE;&#x96F6;&#x5B9E;&#x73B0;&#x4E00;&#x4E2A;&#x90AE;&#x4EF6;&#x6536;&#x53D1;&#x5BA2;&#x6237;&#x7AEF;" class="anchor-navigation-ex-anchor" href="#&#x4ECE;&#x96F6;&#x5B9E;&#x73B0;&#x4E00;&#x4E2A;&#x90AE;&#x4EF6;&#x6536;&#x53D1;&#x5BA2;&#x6237;&#x7AEF;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x4ECE;&#x96F6;&#x5B9E;&#x73B0;&#x4E00;&#x4E2A;&#x90AE;&#x4EF6;&#x6536;&#x53D1;&#x5BA2;&#x6237;&#x7AEF;</h2>
<p>&#x4E0E;&#x90AE;&#x4EF6;&#x6536;&#x53D1;&#x6709;&#x5173;&#x7684;&#x534F;&#x8BAE;&#x6709; POP3&#x3001;SMPT &#x548C; IMAP &#x7B49;&#x3002;</p>
<p><strong>POP3</strong></p>
<p><strong>POP3</strong>&#x5168;&#x79F0;&#x662F; Post Office Protocol 3 &#xFF0C;&#x5373;&#x90AE;&#x5C40;&#x534F;&#x8BAE;&#x7684;&#x7B2C; 3 &#x4E2A;&#x7248;&#x672C;&#xFF0C;&#x5B83;&#x89C4;&#x5B9A;&#x600E;&#x6837;&#x5C06;&#x4E2A;&#x4EBA;&#x8BA1;&#x7B97;&#x673A;&#x8FDE;&#x63A5;&#x5230; Internet &#x7684;&#x90AE;&#x4EF6;&#x670D;&#x52A1;&#x5668;&#x548C;&#x4E0B;&#x8F7D;&#x7535;&#x5B50;&#x90AE;&#x4EF6;&#x7684;&#x7535;&#x5B50;&#x534F;&#x8BAE;&#xFF0C;&#x5B83;&#x662F;&#x56E0;&#x7279;&#x7F51;&#x7535;&#x5B50;&#x90AE;&#x4EF6;&#x7684;&#x7B2C;&#x4E00;&#x4E2A;&#x79BB;&#x7EBF;&#x534F;&#x8BAE;&#x6807;&#x51C6;&#xFF0C;POP3 &#x5141;&#x8BB8;&#x7528;&#x6237;&#x4ECE;&#x670D;&#x52A1;&#x5668;&#x4E0A;&#x628A;&#x90AE;&#x4EF6;&#x5B58;&#x50A8;&#x5230;&#x672C;&#x5730;&#x4E3B;&#x673A;&#xFF08;&#x5373;&#x81EA;&#x5DF1;&#x7684;&#x8BA1;&#x7B97;&#x673A;&#xFF09;&#x4E0A;&#xFF0C;&#x540C;&#x65F6;&#x5220;&#x9664;&#x4FDD;&#x5B58;&#x5728;&#x90AE;&#x4EF6;&#x670D;&#x52A1;&#x5668;&#x4E0A;&#x7684;&#x90AE;&#x4EF6;&#xFF0C;&#x800C; POP3 &#x670D;&#x52A1;&#x5668;&#x5219;&#x662F;&#x9075;&#x5FAA; POP3 &#x534F;&#x8BAE;&#x7684;&#x63A5;&#x6536;&#x90AE;&#x4EF6;&#x670D;&#x52A1;&#x5668;&#xFF0C;&#x7528;&#x6765;&#x63A5;&#x6536;&#x7535;&#x5B50;&#x90AE;&#x4EF6;&#x7684;&#x3002;</p>
<p><strong>SMTP</strong></p>
<p><strong>SMTP</strong> &#x7684;&#x5168;&#x79F0;&#x662F; Simple Mail Transfer Protocol&#xFF0C;&#x5373;&#x7B80;&#x5355;&#x90AE;&#x4EF6;&#x4F20;&#x8F93;&#x534F;&#x8BAE;&#x3002;&#x5B83;&#x662F;&#x4E00;&#x7EC4;&#x7528;&#x4E8E;&#x4ECE;&#x6E90;&#x5730;&#x5740;&#x5230;&#x76EE;&#x7684;&#x5730;&#x5740;&#x4F20;&#x8F93;&#x90AE;&#x4EF6;&#x7684;&#x89C4;&#x8303;&#xFF0C;&#x5B83;&#x5E2E;&#x52A9;&#x6BCF;&#x53F0;&#x8BA1;&#x7B97;&#x673A;&#x5728;&#x53D1;&#x9001;&#x6216;&#x4E2D;&#x8F6C;&#x90AE;&#x4EF6;&#x65F6;&#x627E;&#x5230;&#x4E0B;&#x4E00;&#x4E2A;&#x76EE;&#x7684;&#x5730;&#x3002;SMTP &#x670D;&#x52A1;&#x5668;&#x5C31;&#x662F;&#x9075;&#x5FAA; SMTP &#x534F;&#x8BAE;&#x7684;&#x53D1;&#x9001;&#x90AE;&#x4EF6;&#x670D;&#x52A1;&#x5668;&#x3002;SMTP &#x9700;&#x8981;&#x8BA4;&#x8BC1;&#xFF0C;&#x7B80;&#x5355;&#x5730;&#x8BF4;&#x5C31;&#x662F;&#x8981;&#x6C42;&#x5FC5;&#x987B;&#x5728;&#x63D0;&#x4F9B;&#x4E86;&#x8D26;&#x6237;&#x540D;&#x548C;&#x5BC6;&#x7801;&#x4E4B;&#x540E;&#x624D;&#x53EF;&#x4EE5;&#x767B;&#x5F55; SMTP &#x670D;&#x52A1;&#x5668;&#xFF0C;&#x8FD9;&#x5C31;&#x4F7F;&#x5F97;&#x90A3;&#x4E9B;&#x5783;&#x573E;&#x90AE;&#x4EF6;&#x7684;&#x6563;&#x64AD;&#x8005;&#x65E0;&#x53EF;&#x4E58;&#x4E4B;&#x673A;&#xFF0C;&#x4F7F;&#x7528;&#x6237;&#x907F;&#x514D;&#x53D7;&#x5230;&#x5783;&#x573E;&#x90AE;&#x4EF6;&#x7684;&#x4FB5;&#x6270;&#x3002;</p>
<p><strong>IMAP</strong></p>
<p><strong>IMAP</strong>&#x5168;&#x79F0;&#x662F; Internet Mail Access Protocol&#xFF0C;&#x5373;&#x4EA4;&#x4E92;&#x5F0F;&#x90AE;&#x4EF6;&#x5B58;&#x53D6;&#x534F;&#x8BAE;&#xFF0C;&#x5B83;&#x662F;&#x8DDF; POP3 &#x7C7B;&#x4F3C;&#x90AE;&#x4EF6;&#x8BBF;&#x95EE;&#x6807;&#x51C6;&#x534F;&#x8BAE;&#x4E4B;&#x4E00;&#x3002;&#x4E0D;&#x540C;&#x7684;&#x662F;&#xFF0C;&#x5F00;&#x542F;&#x4E86; IMAP &#x540E;&#xFF0C;&#x5728;&#x7535;&#x5B50;&#x90AE;&#x4EF6;&#x5BA2;&#x6237;&#x7AEF;&#x6536;&#x53D6;&#x7684;&#x90AE;&#x4EF6;&#x4ECD;&#x7136;&#x4FDD;&#x7559;&#x5728;&#x670D;&#x52A1;&#x5668;&#x4E0A;&#xFF0C;&#x540C;&#x65F6;&#x5728;&#x5BA2;&#x6237;&#x7AEF;&#x4E0A;&#x7684;&#x64CD;&#x4F5C;&#x90FD;&#x4F1A;&#x53CD;&#x9988;&#x5230;&#x670D;&#x52A1;&#x5668;&#x4E0A;&#xFF0C;&#x5982;&#xFF1A;&#x5220;&#x9664;&#x90AE;&#x4EF6;&#xFF0C;&#x6807;&#x8BB0;&#x5DF2;&#x8BFB;&#x7B49;&#xFF0C;&#x670D;&#x52A1;&#x5668;&#x4E0A;&#x7684;&#x90AE;&#x4EF6;&#x4E5F;&#x4F1A;&#x505A;&#x76F8;&#x5E94;&#x7684;&#x52A8;&#x4F5C;&#x3002;&#x6240;&#x4EE5;&#x65E0;&#x8BBA;&#x4ECE;&#x6D4F;&#x89C8;&#x5668;&#x767B;&#x5F55;&#x90AE;&#x7BB1;&#x6216;&#x8005;&#x5BA2;&#x6237;&#x7AEF;&#x8F6F;&#x4EF6;&#x767B;&#x5F55;&#x90AE;&#x7BB1;&#xFF0C;&#x770B;&#x5230;&#x7684;&#x90AE;&#x4EF6;&#x4EE5;&#x53CA;&#x72B6;&#x6001;&#x90FD;&#x662F;&#x4E00;&#x81F4;&#x7684;&#x3002;&#x800C; POP3 &#x5BF9;&#x90AE;&#x4EF6;&#x7684;&#x64CD;&#x4F5C;&#x53EA;&#x4F1A;&#x5728;&#x672C;&#x5730;&#x90AE;&#x4EF6;&#x5BA2;&#x6237;&#x7AEF;&#x8D77;&#x4F5C;&#x7528;&#x3002;</p>
<p>&#x8BFB;&#x8005;&#x5982;&#x679C;&#x9700;&#x8981;&#x81EA;&#x5DF1;&#x7F16;&#x5199;&#x76F8;&#x5173;&#x7684;&#x90AE;&#x4EF6;&#x6536;&#x53D1;&#x5BA2;&#x6237;&#x7AEF;&#xFF0C;&#x9700;&#x8981;&#x767B;&#x5F55;&#x5BF9;&#x5E94;&#x7684;&#x90AE;&#x4EF6;&#x670D;&#x52A1;&#x5668;&#x5F00;&#x542F;&#x76F8;&#x5E94;&#x7684;  POP3/SMTP/IMAP &#x670D;&#x52A1;&#x3002;&#x4EE5; 163 &#x90AE;&#x7BB1;&#x4E3A;&#x4F8B;&#xFF1A;</p>
<p>&#x8BF7;&#x767B;&#x5F55; 163 &#x90AE;&#x7BB1;(<a href="http://mail.163.com/)&#xFF0C;&#x70B9;&#x51FB;&#x9875;&#x9762;&#x6B63;&#x4E0A;&#x65B9;&#x7684;&#x201C;**&#x8BBE;&#x7F6E;**&#x201D;&#xFF0C;&#x518D;&#x70B9;&#x51FB;&#x5DE6;&#x4FA7;&#x4E0A;&#x201C;**POP3/SMTP/IMAP**&#x201D;&#xFF0C;&#x5176;&#x4E2D;&#x201C;**&#x5F00;&#x542F;" target="_blank">http://mail.163.com/)&#xFF0C;&#x70B9;&#x51FB;&#x9875;&#x9762;&#x6B63;&#x4E0A;&#x65B9;&#x7684;&#x201C;**&#x8BBE;&#x7F6E;**&#x201D;&#xFF0C;&#x518D;&#x70B9;&#x51FB;&#x5DE6;&#x4FA7;&#x4E0A;&#x201C;**POP3/SMTP/IMAP**&#x201D;&#xFF0C;&#x5176;&#x4E2D;&#x201C;**&#x5F00;&#x542F;</a> SMTP &#x670D;&#x52A1;**&#x201D;&#x662F;&#x7CFB;&#x7EDF;&#x9ED8;&#x8BA4;&#x52FE;&#x9009;&#x5F00;&#x542F;&#x7684;&#x3002;&#x8BFB;&#x8005;&#x53EF;&#x52FE;&#x9009;&#x56FE;&#x4E2D;&#x53E6;&#x4E24;&#x4E2A;&#x9009;&#x9879;&#xFF0C;&#x70B9;&#x51FB;&#x786E;&#x5B9A;&#xFF0C;&#x5373;&#x53EF;&#x5F00;&#x542F;&#x6210;&#x529F;&#x3002;&#x4E0D;&#x52FE;&#x9009;&#x56FE;&#x4E2D;&#x4E24;&#x4E2A;&#x9009;&#x9879;&#xFF0C;&#x70B9;&#x51FB;&#x786E;&#x5B9A;&#xFF0C;&#x53EF;&#x5173;&#x95ED;&#x6210;&#x529F;&#x3002;</p>
<p>&#x7F51;&#x6613;163&#x514D;&#x8D39;&#x90AE;&#x7BB1;&#x76F8;&#x5173;&#x670D;&#x52A1;&#x5668;&#x4FE1;&#x606F;&#xFF1A;</p>
<p><img src="../imgs/mail1.png" alt=""></p>
<p>163&#x514D;&#x8D39;&#x90AE;&#x5BA2;&#x6237;&#x7AEF;&#x8BBE;&#x7F6E;&#x7684;POP3&#x3001;SMTP&#x3001;IMAP&#x5730;&#x5740;</p>
<p>POP3&#x3001;SMTP&#x3001;IMAP &#x534F;&#x8BAE;&#x5C31;&#x662F;&#x6211;&#x4EEC;&#x524D;&#x9762;&#x4ECB;&#x7ECD;&#x7684;&#x4EE5;&#x6307;&#x5B9A;&#x5B57;&#x7B26;&#xFF08;&#x4E32;&#xFF09;&#x4E3A;&#x5305;&#x7684;&#x7ED3;&#x675F;&#x6807;&#x5FD7;&#x7684;&#x534F;&#x8BAE;&#x5178;&#x578B;&#x4F8B;&#x5B50;&#x3002;&#x6211;&#x4EEC;&#x6765;&#x4EE5; SMTP &#x534F;&#x8BAE;&#x548C; POP3 &#x534F;&#x8BAE;&#x4E3A;&#x4F8B;&#x6765;&#x8BB2;&#x89E3;&#x4E00;&#x4E0B;&#x3002;</p>
<h4 id="smtp-&#x534F;&#x8BAE;"><a name="smtp-&#x534F;&#x8BAE;" class="anchor-navigation-ex-anchor" href="#smtp-&#x534F;&#x8BAE;"><i class="fa fa-link" aria-hidden="true"></i></a>SMTP &#x534F;&#x8BAE;</h4>
<p>&#x5148;&#x6765;&#x4ECB;&#x7ECD; SMTP &#x534F;&#x8BAE;&#x5427;&#xFF0C;SMTP &#x5168;&#x79F0;&#x662F; <strong>S</strong>imple <strong>M</strong>ail <strong>T</strong>ransfer <strong>P</strong>rotocol&#xFF0C;&#x5373;&#x7B80;&#x5355;&#x90AE;&#x4EF6;&#x4F20;&#x8F93;&#x534F;&#x8BAE;&#xFF0C;&#x8BE5;&#x534F;&#x8BAE;&#x7528;&#x4E8E;&#x53D1;&#x9001;&#x90AE;&#x4EF6;&#x3002;</p>
<p>SMTP &#x534F;&#x8BAE;&#x7684;&#x683C;&#x5F0F;&#xFF1A;</p>
<pre class="language-"><code>&#x5173;&#x952E;&#x5B57; &#x81EA;&#x5B9A;&#x4E49;&#x5185;&#x5BB9;\r\n
</code></pre><p>&#x201C;&#x81EA;&#x5B9A;&#x4E49;&#x5185;&#x5BB9;&#x201D;&#x6839;&#x636E;&#x201C;&#x5173;&#x952E;&#x5B57;&#x201D;&#x7684;&#x7C7B;&#x578B;&#x662F;&#x5426;&#x8BBE;&#x7F6E;&#xFF0C;&#x5BF9;&#x4E8E;&#x4F7F;&#x7528; SMTP &#x4F5C;&#x4E3A;&#x5BA2;&#x6237;&#x7AEF;&#x7684;&#x4E00;&#x65B9;&#x5E38;&#x7528;&#x7684;&#x201C;&#x5173;&#x952E;&#x5B57;&#x201C;&#x5982;&#x4E0B;&#x6240;&#x793A;&#xFF1A;</p>
<pre class="language-"><code>//&#x8FDE;&#x63A5;&#x4E0A;&#x90AE;&#x4EF6;&#x670D;&#x52A1;&#x5668;&#x4E4B;&#x540E;&#x767B;&#x5F55;&#x670D;&#x52A1;&#x5668;&#x4E4B;&#x524D;&#x5411;&#x670D;&#x52A1;&#x5668;&#x53D1;&#x9001;&#x7684;&#x95EE;&#x5019;&#x4FE1;&#x606F;
HELO &#x81EA;&#x5B9A;&#x4E49;&#x95EE;&#x5019;&#x8BED;\r\n

//&#x8BF7;&#x6C42;&#x767B;&#x5F55;&#x90AE;&#x4EF6;&#x670D;&#x52A1;&#x5668;
AUTH LOGIN\r\n
base64&#x5F62;&#x5F0F;&#x7684;&#x7528;&#x6237;&#x540D;\r\n
base64&#x5F62;&#x5F0F;&#x7684;&#x5BC6;&#x7801;\r\n

//&#x8BBE;&#x7F6E;&#x53D1;&#x4EF6;&#x4EBA;&#x90AE;&#x7BB1;&#x5730;&#x5740;
MAIL FROM:&#x53D1;&#x4EF6;&#x4EBA;&#x5730;&#x5740;\r\n

//&#x8BBE;&#x7F6E;&#x6536;&#x4EF6;&#x4EBA;&#x5730;&#x5740;&#xFF0C;&#x6BCF;&#x6B21;&#x53D1;&#x9001;&#x53EF;&#x8BBE;&#x7F6E;&#x4E00;&#x4E2A;&#x6536;&#x4EF6;&#x4EBA;&#x5730;&#x5740;&#xFF0C;&#x5982;&#x679C;&#x6709;&#x591A;&#x4E2A;&#x6536;&#x4EF6;&#x5730;&#x5740;&#xFF0C;&#x8981;&#x5206;&#x522B;&#x8BBE;&#x7F6E;&#x5BF9;&#x5E94;&#x6B21;&#x6570;
rcpt to:&#x6536;&#x4EF6;&#x4EBA;&#x5730;&#x5740;\r\n

//&#x53D1;&#x9001;&#x90AE;&#x4EF6;&#x6B63;&#x6587;&#x5F00;&#x59CB;&#x6807;&#x5FD7;
DATA\r\n
//&#x53D1;&#x9001;&#x90AE;&#x4EF6;&#x6B63;&#x6587;&#xFF0C;&#x6CE8;&#x610F;&#x90AE;&#x4EF6;&#x6B63;&#x6587;&#x4EE5;.\r\n&#x7ED3;&#x675F;
&#x90AE;&#x4EF6;&#x6B63;&#x6587;\r\n.\r\n

//&#x767B;&#x51FA;&#x670D;&#x52A1;&#x5668;
QUIT\r\n
</code></pre><p>&#x4F7F;&#x7528; SMTP &#x4F5C;&#x4E3A;&#x90AE;&#x4EF6;&#x670D;&#x52A1;&#x5668;&#x7684;&#x4E00;&#x65B9;&#x5E38;&#x7528;&#x7684;&#x201C;&#x5173;&#x952E;&#x5B57;&#x201C;&#x662F;&#x5B9A;&#x4E49;&#x7684;&#x5404;&#x79CD;&#x5E94;&#x7B54;&#x7801;&#xFF0C;&#x5E94;&#x7B54;&#x7801;&#x540E;&#x9762;&#x53EF;&#x4EE5;&#x5E26;&#x4E0A;&#x81EA;&#x5DF1;&#x7684;&#x4FE1;&#x606F;&#xFF0C;&#x7136;&#x540E;&#x4EE5;\r\n&#x4F5C;&#x4E3A;&#x7ED3;&#x675F;&#xFF0C;&#x683C;&#x5F0F;&#x5982;&#x4E0B;&#xFF1A;</p>
<pre class="language-"><code>&#x5E94;&#x7B54;&#x7801; &#x81EA;&#x5B9A;&#x4E49;&#x6D88;&#x606F;\r\n
</code></pre><p>&#x5E38;&#x7528;&#x7684;&#x5E94;&#x7B54;&#x7801;&#x542B;&#x4E49;&#x5982;&#x4E0B;&#x6240;&#x793A;&#xFF1A;</p>
<pre class="language-"><code>211 &#x5E2E;&#x52A9;&#x8FD4;&#x56DE;&#x7CFB;&#x7EDF;&#x72B6;&#x6001;
214 &#x5E2E;&#x52A9;&#x4FE1;&#x606F;
220 &#x670D;&#x52A1;&#x51C6;&#x5907;&#x5C31;&#x7EEA;
221 &#x5173;&#x95ED;&#x8FDE;&#x63A5;
235 &#x7528;&#x6237;&#x9A8C;&#x8BC1;&#x6210;&#x529F;
250 &#x8BF7;&#x6C42;&#x64CD;&#x4F5C;&#x5C31;&#x7EEA;
251 &#x7528;&#x6237;&#x4E0D;&#x5728;&#x672C;&#x5730;&#xFF0C;&#x8F6C;&#x5BC4;&#x5230;&#x5176;&#x4ED6;&#x8DEF;&#x5F84;
334 &#x7B49;&#x5F85;&#x7528;&#x6237;&#x8F93;&#x5165;&#x9A8C;&#x8BC1;&#x4FE1;&#x606F;
354 &#x5F00;&#x59CB;&#x90AE;&#x4EF6;&#x8F93;&#x5165;
421 &#x670D;&#x52A1;&#x4E0D;&#x53EF;&#x7528;
450 &#x64CD;&#x4F5C;&#x672A;&#x6267;&#x884C;&#xFF0C;&#x90AE;&#x7BB1;&#x5FD9;
451 &#x64CD;&#x4F5C;&#x4E2D;&#x6B62;&#xFF0C;&#x672C;&#x5730;&#x9519;&#x8BEF;
452 &#x64CD;&#x4F5C;&#x672A;&#x6267;&#x884C;&#xFF0C;&#x5B58;&#x50A8;&#x7A7A;&#x95F4;&#x4E0D;&#x8DB3;
500 &#x547D;&#x4EE4;&#x4E0D;&#x53EF;&#x8BC6;&#x522B;&#x6216;&#x8BED;&#x8A00;&#x9519;&#x8BEF;
501 &#x53C2;&#x6570;&#x8BED;&#x6CD5;&#x9519;&#x8BEF;
502 &#x547D;&#x4EE4;&#x4E0D;&#x652F;&#x6280;
503 &#x547D;&#x4EE4;&#x987A;&#x5E8F;&#x9519;&#x8BEF;
504 &#x547D;&#x4EE4;&#x53C2;&#x6570;&#x4E0D;&#x652F;&#x6301;
550 &#x64CD;&#x4F5C;&#x672A;&#x6267;&#x884C;&#xFF0C;&#x90AE;&#x7BB1;&#x4E0D;&#x53EF;&#x7528;
551 &#x975E;&#x672C;&#x5730;&#x7528;&#x6237;
552 &#x4E2D;&#x6B62;&#x5B58;&#x50A8;&#x7A7A;&#x95F4;&#x4E0D;&#x8DB3;
553 &#x64CD;&#x4F5C;&#x672A;&#x6267;&#x884C;&#xFF0C;&#x90AE;&#x7BB1;&#x540D;&#x4E0D;&#x6B63;&#x786E;
554 &#x4F20;&#x8F93;&#x5931;&#x8D25;
</code></pre><p>&#x66F4;&#x591A;&#x7684; SMTP &#x534F;&#x8BAE;&#x7684;&#x7EC6;&#x8282;&#x53EF;&#x4EE5;&#x53C2;&#x8003;&#x76F8;&#x5E94;&#x7684; RFC &#x6587;&#x6863;&#x3002;</p>
<p>&#x4E0B;&#x9762;&#x6211;&#x4EEC;&#x6765;&#x770B;&#x4E00;&#x4E2A;&#x5177;&#x4F53;&#x7684;&#x4F7F;&#x7528; SMTP &#x53D1;&#x9001;&#x90AE;&#x4EF6;&#x7684;&#x4EE3;&#x7801;&#x793A;&#x4F8B;&#xFF0C;&#x5047;&#x8BBE;&#x6211;&#x4EEC;&#x73B0;&#x5728;&#x8981;&#x5B9E;&#x73B0;&#x4E00;&#x4E2A;&#x90AE;&#x4EF6;&#x62A5;&#x8B66;&#x7CFB;&#x7EDF;&#xFF0C;&#x6839;&#x636E;&#x4E0A;&#x6587;&#x7684;&#x4ECB;&#x7ECD;&#xFF0C;&#x6211;&#x4EEC;&#x5B9E;&#x73B0;&#x4E00;&#x4E2A; SmtpSocket &#x7C7B;&#x6765;&#x7EFC;&#x5408;&#x5E38;&#x7528;&#x90AE;&#x4EF6;&#x7684;&#x529F;&#x80FD;&#xFF1A;</p>
<p><strong>SmtpSocket.h</strong></p>
<pre class="language-"><code>/**
 * &#x53D1;&#x9001;&#x90AE;&#x4EF6;&#x7C7B;&#xFF0C;SmtpSocket.h
 * zhangyl 2019.05.11
 */

#pragma once

#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>string</span><span class="token punctuation">&gt;</span></span>
#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>vector</span><span class="token punctuation">&gt;</span></span>
#include &quot;Platform.h&quot;

class SmtpSocket final
{
public:
    static bool sendMail(const std::string&amp; server, short port, const std::string&amp; from, const std::string&amp; fromPassword,
                         const std::vector<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token namespace">std:</span>:string</span><span class="token punctuation">&gt;</span></span>&amp; to, const std::string&amp; subject, const std::string&amp; mailData);

public:
    SmtpSocket(void);
    ~SmtpSocket(void);

    bool isConnected() const { return m_hSocket; }
    bool connect(const char* pszUrl, short port = 25);
    bool logon(const char* pszUser, const char* pszPassword);
    bool setMailFrom(const char* pszFrom);
    bool setMailTo(const std::vector<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token namespace">std:</span>:string</span><span class="token punctuation">&gt;</span></span>&amp; sendTo);
    bool send(const std::string&amp; subject, const std::string&amp; mailData);

    void closeConnection();
    void quit();    //&#x9000;&#x51FA;

private:
    /**
     *    &#x9A8C;&#x8BC1;&#x4ECE;&#x670D;&#x52A1;&#x5668;&#x8FD4;&#x56DE;&#x7684;&#x524D;&#x4E09;&#x4F4D;&#x4EE3;&#x7801;&#x548C;&#x4F20;&#x9012;&#x8FDB;&#x6765;&#x7684;&#x53C2;&#x6570;&#x662F;&#x5426;&#x4E00;&#x6837;
     */
    bool checkResponse(const char* recvCode);

private:    
    bool                        m_bConnected;
    SOCKET                        m_hSocket;
    std::string                 m_strUser;
    std::string                 m_strPassword;
    std::string                 m_strFrom;
    std::vector<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token namespace">std:</span>:string</span><span class="token punctuation">&gt;</span></span>    m_strTo;;
};
</code></pre><p><strong>SmtpSocket.cpp</strong></p>
<pre class="language-"><code>#include &quot;SmtpSocket.h&quot;
#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>sstream</span><span class="token punctuation">&gt;</span></span>
#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>time.h</span><span class="token punctuation">&gt;</span></span>
#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>string.h</span><span class="token punctuation">&gt;</span></span>
#include &quot;Base64Util.h&quot;
#include &quot;Platform.h&quot;

bool SmtpSocket::sendMail(const std::string&amp; server, short port, const std::string&amp; from, const std::string&amp; fromPassword, 
                          const std::vector<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token namespace">std:</span>:string</span><span class="token punctuation">&gt;</span></span>&amp; to, const std::string&amp; subject, const std::string&amp; mailData)
{
    size_t atSymbolPos = from.find_first_of(&quot;@&quot;);
    if (atSymbolPos == std::string::npos)
        return false;

    std::string strUser = from.substr(0, atSymbolPos);

    SmtpSocket smtpSocket;
    //smtp.163.com 25
    if (!smtpSocket.connect(server.c_str(), port))
        return false;

    //testformybook 2019hhxxttxs
    if (!smtpSocket.logon(strUser.c_str(), fromPassword.c_str()))
        return false;

    //testformybook@163.com 
    if (!smtpSocket.setMailFrom(from.c_str()))
        return false;

    if (!smtpSocket.setMailTo(to))
        return false;

    if (!smtpSocket.send(subject, mailData))
        return false;

    return true;
}

SmtpSocket::SmtpSocket() : m_bConnected(false), m_hSocket(-1)
{

}

SmtpSocket::~SmtpSocket()
{
    quit();
}

bool SmtpSocket::checkResponse(const char* recvCode)
{
    char recvBuffer[1024] = { 0 };
    long lResult = 0;
    lResult = recv(m_hSocket, recvBuffer, 1024, 0);
    if (lResult == SOCKET_ERROR || lResult &lt; 3)
        return false;

    return  recvCode[0] == recvBuffer[0] &amp;&amp; \
            recvCode[1] == recvBuffer[1] &amp;&amp; \
            recvCode[2] == recvBuffer[2] ? true : false;
}

void SmtpSocket::quit()
{
    if (m_hSocket &lt; 0)
        return;

    //&#x9000;&#x51FA;
    if (::send(m_hSocket, &quot;QUIT\r\n&quot;, strlen(&quot;QUIT\r\n&quot;), 0) == SOCKET_ERROR)
    {
        closeConnection();
        return;
    }

    if (!checkResponse(&quot;221&quot;)) 
        return;
}


bool SmtpSocket::logon(const char* pszUser, const char* pszPassword)
{
    if (m_hSocket &lt; 0)
        return false;

    //&#x53D1;&#x9001;&quot;AUTH LOGIN&quot;
    if (::send(m_hSocket, &quot;AUTH LOGIN\r\n&quot;, strlen(&quot;AUTH LOGIN\r\n&quot;), 0) == SOCKET_ERROR) 
        return false;

    if (!checkResponse(&quot;334&quot;)) 
        return false;

    //&#x53D1;&#x9001;&#x7ECF;base64&#x7F16;&#x7801;&#x7684;&#x7528;&#x6237;&#x540D;
    char szUserEncoded[64] = { 0 };
    Base64Util::encode(szUserEncoded, pszUser, strlen(pszUser), &apos;=&apos;, 64);
    strncat(szUserEncoded, &quot;\r\n&quot;, 64);
    //MailLogNormalA(&quot;[SmtpSocket::Logon] Logon [User:%s].&quot;, lpUser);
    if (::send(m_hSocket, szUserEncoded, strlen(szUserEncoded), 0) == SOCKET_ERROR) 
        return false;

    if (!checkResponse(&quot;334&quot;)) 
        return false;

    //&#x53D1;&#x9001;&#x7ECF;base64&#x7F16;&#x7801;&#x7684;&#x5BC6;&#x7801;
    //&#x9A8C;&#x8BC1;&#x5BC6;&#x7801;
    char szPwdEncoded[64] = { 0 };
    Base64Util::encode(szPwdEncoded, pszPassword, strlen(pszPassword), &apos;=&apos;, 64);
    strncat(szPwdEncoded, &quot;\r\n&quot;, 64);
    //MailLogNormalA(&quot;[SmtpSocket::Logon] Logon [User:%s] [Pass:*****].&quot;, lpUser);
    if (::send(m_hSocket, szPwdEncoded, strlen(szPwdEncoded), 0) == SOCKET_ERROR)
        return false;

    if (!checkResponse(&quot;235&quot;)) 
        return false;

    m_strUser = pszUser;
    m_strPassword = pszPassword;

    return true;
}

void SmtpSocket::closeConnection()
{
    if (m_hSocket &gt;= 0)
    {
        closesocket(m_hSocket);
        m_hSocket = -1;
        m_bConnected = false;
    }
}

bool SmtpSocket::connect(const char* pszUrl, short port/* = 25*/)
{
    //MailLogNormalA(&quot;[SmtpSocket::Connect] Start connect [%s:%d].&quot;, lpUrl, lPort);
    struct sockaddr_in server = { 0 };
    struct hostent* pHostent = NULL;
    unsigned int addr = 0;

    closeConnection();
    m_hSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);

    if (m_hSocket &lt; 0) 
        return false;

    long tmSend(15 * 1000L), tmRecv(15 * 1000L), noDelay(1);
    setsockopt(m_hSocket, IPPROTO_TCP, TCP_NODELAY, (char*)&amp; noDelay, sizeof(long));
    setsockopt(m_hSocket, SOL_SOCKET, SO_SNDTIMEO, (char*)&amp; tmSend, sizeof(long));
    setsockopt(m_hSocket, SOL_SOCKET, SO_RCVTIMEO, (char*)&amp; tmRecv, sizeof(long));

    if (inet_addr(pszUrl) == INADDR_NONE)
    {
        pHostent = gethostbyname(pszUrl);
    }
    else
    {
        addr = inet_addr(pszUrl);
        pHostent = gethostbyaddr((char*)&amp; addr, sizeof(addr), AF_INET);
    }

    if (!pHostent)
        return false;

    server.sin_family = AF_INET;
    server.sin_port = htons((u_short)port);
    server.sin_addr.s_addr = *((unsigned long*)pHostent-&gt;h_addr);
    if (::connect(m_hSocket, (struct sockaddr*) &amp; server, sizeof(server)) == SOCKET_ERROR)
        return false;

    if (!checkResponse(&quot;220&quot;)) 
        return false;

    //&#x5411;&#x670D;&#x52A1;&#x5668;&#x53D1;&#x9001;&quot;HELO &quot;+&#x670D;&#x52A1;&#x5668;&#x540D;
    //string strTmp=&quot;HELO &quot;+SmtpAddr+&quot;\r\n&quot;;
    char szSend[256] = { 0 };
    snprintf(szSend, sizeof(szSend), &quot;HELO %s\r\n&quot;, pszUrl);
    if (::send(m_hSocket, szSend, strlen(szSend), 0) == SOCKET_ERROR) 
        return false;

    if (!checkResponse(&quot;250&quot;)) 
        return false;

    m_bConnected = true;

    return true;
}

bool SmtpSocket::setMailFrom(const char* pszFrom)
{
    if (m_hSocket &lt; 0) 
        return false;

    char szSend[256] = { 0 };
    snprintf(szSend, sizeof(szSend), &quot;MAIL FROM:&lt;%s&gt;\r\n&quot;, pszFrom);
    if (::send(m_hSocket, szSend, strlen(szSend), 0) == SOCKET_ERROR) 
        return false;

    if (!checkResponse(&quot;250&quot;)) 
        return false;

    m_strFrom = pszFrom;

    return true;
}

bool SmtpSocket::setMailTo(const std::vector<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token namespace">std:</span>:string</span><span class="token punctuation">&gt;</span></span>&amp; sendTo)
{
    if (m_hSocket &lt; 0)
        return false;

    char szSend[256] = { 0 };

    for (const auto&amp; iter : sendTo)
    {
        snprintf(szSend, sizeof(szSend), &quot;rcpt to:  &lt;%s&gt;\r\n&quot;, iter.c_str());
        if (::send(m_hSocket, szSend, strlen(szSend), 0) == SOCKET_ERROR)
            return false;

        if (!checkResponse(&quot;250&quot;))
            return false;
    }


    m_strTo = sendTo;

    return true;
}

bool SmtpSocket::send(const std::string&amp; subject, const std::string&amp; mailData)
{
    if (m_hSocket &lt; 0) 
        return false;

    std::ostringstream osContent;

    //&#x6CE8;&#x610F;&#xFF1A;&#x90AE;&#x4EF6;&#x6B63;&#x6587;&#x5185;&#x5BB9;&#x4E0E;&#x5176;&#x4ED6;&#x9644;&#x5C5E;&#x5B57;&#x6837;&#x4E4B;&#x95F4;&#x4E00;&#x5B9A;&#x8981;&#x7A7A;&#x4E00;&#x884C;
    osContent &lt;&lt; &quot;Date: &quot; &lt;&lt; time(nullptr) &lt;&lt; &quot;\r\n&quot;;
    osContent &lt;&lt; &quot;from: &quot; &lt;&lt; m_strFrom &lt;&lt; &quot;\r\n&quot;;
    osContent &lt;&lt; &quot;to: &quot;;
    for (const auto&amp; iter : m_strTo)
    {
        osContent &lt;&lt; iter &lt;&lt; &quot;;&quot;;
    }
    osContent &lt;&lt; &quot;\r\n&quot;;
    osContent &lt;&lt; &quot;subject: &quot; &lt;&lt; subject &lt;&lt; &quot;\r\n&quot;;
    osContent &lt;&lt; &quot;Content-Type: text/plain; charset=UTF-8\r\n&quot;;
    osContent &lt;&lt; &quot;Content-Transfer-Encoding: quoted-printable\r\n\r\n&quot;;
    osContent &lt;&lt; mailData &lt;&lt; &quot;\r\n.\r\n&quot;;

    std::string data = osContent.str();
    const char* lpSendBuffer = data.c_str();

    //&#x53D1;&#x9001;&quot;DATA\r\n&quot;
    if (::send(m_hSocket, &quot;DATA\r\n&quot;, strlen(&quot;DATA\r\n&quot;), 0) == SOCKET_ERROR)
        return false;

    if (!checkResponse(&quot;354&quot;))
        return false;

    long dwSend = 0;
    long dwOffset = 0;
    long lTotal = data.length();
    long lResult = 0;
    const long SEND_MAX_SIZE = 1024 * 100000;
    while ((long)dwOffset &lt; lTotal)
    {
        if (lTotal - dwOffset &gt; SEND_MAX_SIZE) 
            dwSend = SEND_MAX_SIZE;
        else 
            dwSend = lTotal - dwOffset;

        lResult = ::send(m_hSocket, lpSendBuffer + dwOffset, dwSend, 0);
        if (lResult == SOCKET_ERROR) 
            return false;

        dwOffset += lResult;
    }

    if (!checkResponse(&quot;250&quot;)) 
        return false;

    return true;
}
</code></pre><p>&#x7136;&#x540E;&#x6211;&#x4EEC;&#x4F7F;&#x7528;&#x53E6;&#x5916;&#x4E00;&#x4E2A;&#x7C7B; MailMonitor &#x5BF9; SmtpSocket &#x5BF9;&#x8C61;&#x7684;&#x529F;&#x80FD;&#x8FDB;&#x884C;&#x9AD8;&#x5C42;&#x62BD;&#x8C61;&#xFF1A;</p>
<p><strong>MailMonitor.h</strong></p>
<pre class="language-"><code>/**
 * &#x90AE;&#x4EF6;&#x76D1;&#x63A7;&#x7EBF;&#x7A0B;, MailMonitor.h
 * zhangyl 2019.05.11
 */

#pragma once

#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>string</span><span class="token punctuation">&gt;</span></span>
#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>vector</span><span class="token punctuation">&gt;</span></span>
#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>list</span><span class="token punctuation">&gt;</span></span>
#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>memory</span><span class="token punctuation">&gt;</span></span>
#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>mutex</span><span class="token punctuation">&gt;</span></span>
#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>condition_variable</span><span class="token punctuation">&gt;</span></span>
#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>thread</span><span class="token punctuation">&gt;</span></span>

struct MailItem
{
    std::string subject;
    std::string content;
};

class MailMonitor final
{
public:
    static MailMonitor&amp; getInstance();

private:
    MailMonitor() = default;
    ~MailMonitor() = default;
    MailMonitor(const MailMonitor &amp; rhs) = delete;
    MailMonitor&amp; operator=(const MailMonitor &amp; rhs) = delete;

public:
    bool initMonitorMailInfo(const std::string&amp; servername, const std::string&amp; mailserver, short mailport, const std::string&amp; mailfrom, const std::string&amp; mailfromPassword, const std::string&amp; mailto);
    void uninit();
    void wait();

    void run();

    bool alert(const std::string&amp; subject, const std::string&amp; content);

private:
    void alertThread();

    void split(const std::string&amp; str, std::vector<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token namespace">std:</span>:string</span><span class="token punctuation">&gt;</span></span>&amp; v, const char* delimiter = &quot;|&quot;);

private:
    std::string                             m_strMailName;              //&#x7528;&#x4E8E;&#x6807;&#x8BC6;&#x662F;&#x54EA;&#x4E00;&#x53F0;&#x670D;&#x52A1;&#x5668;&#x53D1;&#x9001;&#x7684;&#x90AE;&#x4EF6;
    std::string                             m_strMailServer;
    short                                   m_nMailPort;
    std::string                             m_strFrom;
    std::string                             m_strFromPassword;
    std::vector<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token namespace">std:</span>:string</span><span class="token punctuation">&gt;</span></span>                m_strMailTo;

    std::list<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>MailItem</span><span class="token punctuation">&gt;</span></span>                     m_listMailItemsToSend;      //&#x5F85;&#x5199;&#x5165;&#x7684;&#x65E5;&#x5FD7;
    std::shared_ptr<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token namespace">std:</span>:thread</span><span class="token punctuation">&gt;</span></span>            m_spMailAlertThread;
    std::mutex                              m_mutexAlert;
    std::condition_variable                 m_cvAlert;
    bool                                    m_bExit;                    //&#x9000;&#x51FA;&#x6807;&#x5FD7;
    bool                                    m_bRunning;                 //&#x8FD0;&#x884C;&#x6807;&#x5FD7;
};
</code></pre><p><strong>MailMonitor.cpp</strong></p>
<pre class="language-"><code>#include &quot;MailMonitor.h&quot;
#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>functional</span><span class="token punctuation">&gt;</span></span>
#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>sstream</span><span class="token punctuation">&gt;</span></span>
#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>iostream</span><span class="token punctuation">&gt;</span></span>
#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>string.h</span><span class="token punctuation">&gt;</span></span>
#include &quot;SmtpSocket.h&quot;

MailMonitor&amp; MailMonitor::getInstance()
{
    static MailMonitor instance;
    return instance;
}

bool MailMonitor::initMonitorMailInfo(const std::string&amp; servername, const std::string&amp; mailserver, short mailport, const std::string&amp; mailfrom, const std::string&amp; mailfromPassword, const std::string&amp; mailto)
{
    if (servername.empty() || mailserver.empty() || mailport &lt; 0 || mailfrom.empty() || mailfromPassword.empty() || mailto.empty())
    {
        std::cout &lt;&lt; &quot;Mail account info is not config, not start MailAlert&quot; &lt;&lt; std::endl;
        return false;
    }


    m_strMailName = servername;

    m_strMailServer = mailserver;
    m_nMailPort = mailport;
    m_strFrom = mailfrom;
    m_strFromPassword = mailfromPassword;

    split(mailto, m_strMailTo, &quot;;&quot;);

    std::ostringstream osSubject;
    osSubject &lt;&lt; &quot;[&quot; &lt;&lt; m_strMailName &lt;&lt; &quot;]&quot;;

    SmtpSocket::sendMail(m_strMailServer, m_nMailPort, m_strFrom, m_strFromPassword, m_strMailTo, osSubject.str(), &quot;You have started Mail Alert System.&quot;);

    return true;
}

void MailMonitor::uninit()
{
    m_bExit = true;

    m_cvAlert.notify_one();

    if (m_spMailAlertThread-&gt;joinable())
        m_spMailAlertThread-&gt;join();
}

void MailMonitor::wait()
{
    if (m_spMailAlertThread-&gt;joinable())
        m_spMailAlertThread-&gt;join();
}

void MailMonitor::run()
{
    m_spMailAlertThread.reset(new std::thread(std::bind(&amp;MailMonitor::alertThread, this)));
}

void MailMonitor::alertThread()
{
    m_bRunning = true;

    while (true)
    {        
        MailItem mailItem;
        {
            std::unique_lock<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token namespace">std:</span>:mutex</span><span class="token punctuation">&gt;</span></span> guard(m_mutexAlert);
            while (m_listMailItemsToSend.empty())
            {
                if (m_bExit)
                    return;

                m_cvAlert.wait(guard);
            }

            mailItem = m_listMailItemsToSend.front();
            m_listMailItemsToSend.pop_front();
        }

        std::ostringstream osSubject;
        osSubject &lt;&lt; &quot;[&quot; &lt;&lt; m_strMailName &lt;&lt; &quot;]&quot; &lt;&lt; mailItem.subject;
        SmtpSocket::sendMail(m_strMailServer, m_nMailPort, m_strFrom, m_strFromPassword, m_strMailTo, osSubject.str(), mailItem.content);
    }// end outer-while-loop

    m_bRunning = false;
}

bool MailMonitor::alert(const std::string&amp; subject, const std::string&amp; content)
{
    if (m_strMailServer.empty() || m_nMailPort &lt; 0 || m_strFrom.empty() || m_strFromPassword.empty() || m_strMailTo.empty())
        return false;

    MailItem mailItem;
    mailItem.subject = subject;
    mailItem.content = content;

    {
        std::lock_guard<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token namespace">std:</span>:mutex</span><span class="token punctuation">&gt;</span></span> lock_guard(m_mutexAlert);
        m_listMailItemsToSend.push_back(mailItem);
        m_cvAlert.notify_one();
    }

    return true;
}

void MailMonitor::split(const std::string&amp; str, std::vector<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token namespace">std:</span>:string</span><span class="token punctuation">&gt;</span></span>&amp; v, const char* delimiter/* = &quot;|&quot;*/)
{
    if (delimiter == NULL || str.empty())
        return;

    std::string buf(str);
    size_t pos = std::string::npos;
    std::string substr;
    int delimiterlength = strlen(delimiter);
    while (true)
    {
        pos = buf.find(delimiter);
        if (pos != std::string::npos)
        {
            substr = buf.substr(0, pos);
            if (!substr.empty())
                v.push_back(substr);

            buf = buf.substr(pos + delimiterlength);
        }
        else
        {
            if (!buf.empty())
                v.push_back(buf);
            break;
        }
    }
}
</code></pre><p>&#x7A0B;&#x5E8F;&#x4E2D;&#x53E6;&#x5916;&#x7528;&#x5230;&#x7684;&#x4E24;&#x4E2A;&#x8F85;&#x52A9;&#x7C7B;&#x6587;&#x4EF6;&#x5982;&#x4E0B;&#xFF1A;</p>
<p><strong>Base64Util.h</strong></p>
<pre class="language-"><code>#pragma once

class Base64Util final
{
private:
    Base64Util() = delete;
    ~Base64Util() = delete;
    Base64Util(const Base64Util&amp; rhs) = delete;
    Base64Util&amp; operator=(const Base64Util&amp; rhs) = delete;

public:
    static int encode(char* pDest, const char* pSource, int lenSource, char chMask, int maxDest);
    static int decode(char* pDest, const char* pSource, int lenSource, char chMask, int maxDest);
    static bool check(char* lpString);
};
</code></pre><p><strong>Base64Util.cpp</strong></p>
<pre class="language-"><code>#include &quot;Base64Util.h&quot;
/////////////////////////////////////////////////////////////////////////////////////////////////
static const char __DeBase64Tab__[] =
{
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    62,        // &apos;+&apos;
    0, 0, 0,
    63,        // &apos;/&apos;
    52, 53, 54, 55, 56, 57, 58, 59, 60, 61,        // &apos;0&apos;-&apos;9&apos;
    0, 0, 0, 0, 0, 0, 0,
    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
    13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,        // &apos;A&apos;-&apos;Z&apos;
    0, 0, 0, 0, 0, 0,
    26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
    39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,        // &apos;a&apos;-&apos;z&apos;
};
static const char __EnBase64Tab__[] = { &quot;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/&quot; };

int Base64Util::encode(char* pDest, const char* pSource, int lenSource, char chMask, int maxDest)
{
    char c1, c2, c3;
    int i = 0, lenDest(0), lDiv(lenSource / 3), lMod(lenSource % 3);
    for (; i &lt; lDiv; ++i, lenDest += 4)
    {
        if (lenDest + 4 &gt;= maxDest) 
            return 0;
        c1 = *pSource++;
        c2 = *pSource++;
        c3 = *pSource++;
        *pDest++ = __EnBase64Tab__[c1 &gt;&gt; 2];
        *pDest++ = __EnBase64Tab__[((c1 &lt;&lt; 4) | (c2 &gt;&gt; 4)) &amp; 0X3F];
        *pDest++ = __EnBase64Tab__[((c2 &lt;&lt; 2) | (c3 &gt;&gt; 6)) &amp; 0X3F];
        *pDest++ = __EnBase64Tab__[c3 &amp; 0X3F];
    }
    if (lMod == 1)
    {
        if (lenDest + 4 &gt;= maxDest) return(0);
        c1 = *pSource++;
        *pDest++ = __EnBase64Tab__[(c1 &amp; 0XFC) &gt;&gt; 2];
        *pDest++ = __EnBase64Tab__[((c1 &amp; 0X03) &lt;&lt; 4)];
        *pDest++ = chMask;
        *pDest++ = chMask;
        lenDest += 4;
    }
    else if (lMod == 2)
    {
        if (lenDest + 4 &gt;= maxDest) return(0);
        c1 = *pSource++;
        c2 = *pSource++;
        *pDest++ = __EnBase64Tab__[(c1 &amp; 0XFC) &gt;&gt; 2];
        *pDest++ = __EnBase64Tab__[((c1 &amp; 0X03) &lt;&lt; 4) | ((c2 &amp; 0XF0) &gt;&gt; 4)];
        *pDest++ = __EnBase64Tab__[((c2 &amp; 0X0F) &lt;&lt; 2)];
        *pDest++ = chMask;
        lenDest += 4;
    }
    *pDest = 0;
    return(lenDest);
}

int Base64Util::decode(char* pDest, const char* pSource, int lenSource, char chMask, int maxDest)
{
    int lenDest = 0, nValue = 0, i = 0;
    for (; i &lt; lenSource; i += 4)
    {
        nValue = __DeBase64Tab__[(int)(*pSource)] &lt;&lt; 18;
        pSource++;
        nValue += __DeBase64Tab__[(int)*pSource] &lt;&lt; 12;
        pSource++;
        if (++lenDest &gt;= maxDest) 
            break;

        *pDest++ = char((nValue &amp; 0X00FF0000) &gt;&gt; 16);

        if (*pSource != chMask)
        {
            nValue += __DeBase64Tab__[(int)*pSource] &lt;&lt; 6;
            pSource++;
            if (++lenDest &gt;= maxDest) 
                break;
            *pDest++ = (nValue &amp; 0X0000FF00) &gt;&gt; 8;

            if (*pSource != chMask)
            {
                nValue += __DeBase64Tab__[(int)*pSource];
                pSource++;
                if (++lenDest &gt;= maxDest) 
                    break;
                *pDest++ = nValue &amp; 0X000000FF;
            }
        }
    }
    *pDest = 0;
    return(lenDest);
}

bool Base64Util::check(char* lpString)
{
    for (; *lpString; ++lpString)
    {
        switch (*lpString)
        {
        case    &apos;+&apos;: *lpString = &apos;@&apos;;    break;
        case    &apos;@&apos;: *lpString = &apos;+&apos;;    break;
        case    &apos;=&apos;: *lpString = &apos;$&apos;;    break;
        case    &apos;$&apos;: *lpString = &apos;=&apos;;    break;
        case    &apos;/&apos;: *lpString = &apos;#&apos;;    break;
        case    &apos;#&apos;: *lpString = &apos;/&apos;;    break;
        default:
            if (*lpString &gt;= &apos;A&apos; &amp;&amp; *lpString &lt;= &apos;Z&apos;)
                * lpString = *lpString - &apos;A&apos; + &apos;a&apos;;
            else if (*lpString &gt;= &apos;a&apos; &amp;&amp; *lpString &lt;= &apos;z&apos;)
                * lpString = *lpString - &apos;a&apos; + &apos;A&apos;;
            else if (*lpString &gt;= &apos;0&apos; &amp;&amp; *lpString &lt;= &apos;4&apos;)
                * lpString = *lpString - &apos;0&apos; + &apos;5&apos;;
            else if (*lpString &gt;= &apos;5&apos; &amp;&amp; *lpString &lt;= &apos;9&apos;)
                * lpString = *lpString - &apos;5&apos; + &apos;0&apos;;
            else
                return false;
        }
    }
    return true;
}
</code></pre><p><strong>Platform.h</strong></p>
<pre class="language-"><code>#pragma once

#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>stdint.h</span><span class="token punctuation">&gt;</span></span>

#if defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored &quot;-Wdeprecated-declarations&quot;
#elif defined(_MSC_VER)
#pragma warning(disable : 4996)
#endif

#ifdef WIN32

#pragma comment(lib, &quot;Ws2_32.lib&quot;)
#pragma comment(lib, &quot;Shlwapi.lib&quot;)

//remove warning C4996 on Windows
//#define _CRT_SECURE_NO_WARNINGS

typedef int          socklen_t;
//typedef uint64_t     ssize_t;
typedef unsigned int in_addr_t;

//Windows &#x4E0A;&#x6CA1;&#x6709;&#x8FD9;&#x4E9B;&#x7ED3;&#x6784;&#x7684;&#x5B9A;&#x4E49;&#xFF0C;&#x4E3A;&#x4E86;&#x79FB;&#x690D;&#x65B9;&#x4FBF;&#xFF0C;&#x624B;&#x52A8;&#x5B9A;&#x4E49;&#x8FD9;&#x4E9B;&#x7ED3;&#x6784;
#define  XPOLLIN         1
#define  XPOLLPRI        2
#define  XPOLLOUT        4
#define  XPOLLERR        8 
#define  XPOLLHUP        16
#define  XPOLLNVAL       32
#define  XPOLLRDHUP      8192

#define  XEPOLL_CTL_ADD  1
#define  XEPOLL_CTL_DEL  2
#define  XEPOLL_CTL_MOD  3

#pragma pack(push, 1)
typedef union epoll_data {
    void*    ptr;
    int      fd;
    uint32_t u32;
    uint64_t u64;
} epoll_data_t;

struct epoll_event {
    uint32_t     events;    /* Epoll events */
    epoll_data_t data;      /* User data variable */
};
#pragma pack(pop)

#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>winsock2.h</span><span class="token punctuation">&gt;</span></span>
#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>ws2tcpip.h</span><span class="token punctuation">&gt;</span></span>
#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>Windows.h</span><span class="token punctuation">&gt;</span></span>
#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>Ws2ipdef.h</span><span class="token punctuation">&gt;</span></span>
#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>io.h</span><span class="token punctuation">&gt;</span></span>     //_pipe
#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>fcntl.h</span><span class="token punctuation">&gt;</span></span>  //for O_BINARY
#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>shlwapi.h</span><span class="token punctuation">&gt;</span></span>

class NetworkInitializer
{
public:
    NetworkInitializer();
    ~NetworkInitializer();
};

#else

typedef int SOCKET;

#define SOCKET_ERROR -1

#define closesocket(s) close(s)


#include &lt;arpa/inet.h&gt;

#include &lt;netinet/in.h&gt;
#include &lt;netinet/tcp.h&gt;
#include &lt;netinet/in.h&gt;
#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>netdb.h</span><span class="token punctuation">&gt;</span></span>

#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>unistd.h</span><span class="token punctuation">&gt;</span></span>
#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>stdint.h</span><span class="token punctuation">&gt;</span></span>
#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>endian.h</span><span class="token punctuation">&gt;</span></span>
#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>poll.h</span><span class="token punctuation">&gt;</span></span>
#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>fcntl.h</span><span class="token punctuation">&gt;</span></span>
#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>signal.h</span><span class="token punctuation">&gt;</span></span>
#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>inttypes.h</span><span class="token punctuation">&gt;</span></span>
#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>errno.h</span><span class="token punctuation">&gt;</span></span>
#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>dirent.h</span><span class="token punctuation">&gt;</span></span>


#include &lt;sys/socket.h&gt;
#include &lt;sys/select.h&gt;
#include &lt;sys/time.h&gt;
#include &lt;sys/types.h&gt;
#include &lt;sys/eventfd.h&gt;
#include &lt;sys/stat.h&gt;
#include &lt;sys/uio.h&gt;
#include &lt;sys/epoll.h&gt;
#include &lt;sys/syscall.h&gt;

//for ubuntu readv not found
#ifdef __UBUNTU
#include &lt;sys/uio.h&gt;
#endif 


#define  XPOLLIN         POLLIN
#define  XPOLLPRI        POLLPRI
#define  XPOLLOUT        POLLOUT
#define  XPOLLERR        POLLERR 
#define  XPOLLHUP        POLLHUP
#define  XPOLLNVAL       POLLNVAL
#define  XPOLLRDHUP      POLLRDHUP

#define  XEPOLL_CTL_ADD  EPOLL_CTL_ADD
#define  XEPOLL_CTL_DEL  EPOLL_CTL_DEL
#define  XEPOLL_CTL_MOD  EPOLL_CTL_MOD

//Linux&#x4E0B;&#x6CA1;&#x6709;&#x8FD9;&#x4E24;&#x4E2A;&#x51FD;&#x6570;&#xFF0C;&#x5B9A;&#x4E49;&#x4E4B;
#define ntohll(x) be64toh(x)
#define htonll(x) htobe64(x)

#endif
</code></pre><p><strong>Platform.cpp</strong></p>
<pre class="language-"><code>#include &quot;Platform.h&quot;

#ifdef WIN32

NetworkInitializer::NetworkInitializer()
{
    WORD wVersionRequested = MAKEWORD(2, 2);
    WSADATA wsaData;
    ::WSAStartup(wVersionRequested, &amp;wsaData);   
}

NetworkInitializer::~NetworkInitializer()
{
    ::WSACleanup();
}

#endif
</code></pre><p>&#x6211;&#x4EEC;&#x5728; main &#x51FD;&#x6570;&#x6A21;&#x62DF;&#x4EA7;&#x751F;&#x4E00;&#x6761;&#x65B0;&#x7684;&#x62A5;&#x8B66;&#x90AE;&#x4EF6;&#xFF1A;</p>
<p><strong>main.cpp</strong></p>
<pre class="language-"><code>/**
 *  &#x90AE;&#x4EF6;&#x62A5;&#x8B66;demo
 *  zhangyl 2020.04.09
 **/

#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>iostream</span><span class="token punctuation">&gt;</span></span>
#include <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>stdlib.h</span><span class="token punctuation">&gt;</span></span>
#include &quot;Platform.h&quot;
#include &quot;MailMonitor.h&quot;

//Winsock&#x7F51;&#x7EDC;&#x5E93;&#x521D;&#x59CB;&#x5316;
#ifdef WIN32
NetworkInitializer windowsNetworkInitializer;
#endif


#ifndef WIN32
void prog_exit(int signo)
{
    std::cout &lt;&lt; &quot;program recv signal [&quot; &lt;&lt; signo &lt;&lt; &quot;] to exit.&quot; &lt;&lt; std::endl;

    //&#x505C;&#x6B62;&#x90AE;&#x4EF6;&#x53D1;&#x9001;&#x670D;&#x52A1;
    MailMonitor::getInstance().uninit();
}

#endif

const std::string servername = &quot;MailAlertSysem&quot;;
const std::string mailserver = &quot;smtp.163.com&quot;;
const short mailport = 25;
const std::string mailuser = &quot;testformybook@163.com&quot;;
const std::string mailpassword = &quot;2019hhxxttxs&quot;;
const std::string mailto = &quot;balloonwj@qq.com;analogous_love@qq.com&quot;;

int main(int argc, char* argv[])
{
#ifndef WIN32
    //&#x8BBE;&#x7F6E;&#x4FE1;&#x53F7;&#x5904;&#x7406;
    signal(SIGCHLD, SIG_DFL);
    signal(SIGPIPE, SIG_IGN);
    signal(SIGINT, prog_exit);
    signal(SIGTERM, prog_exit);
#endif

    bool bInitSuccess = MailMonitor::getInstance().initMonitorMailInfo(servername, mailserver, mailport, mailuser, mailpassword, mailto);
    if (bInitSuccess)
        MailMonitor::getInstance().run();

    const std::string subject = &quot;Alert Mail&quot;;
    const std::string content = &quot;This is an alert mail from &quot; + mailuser;
    MailMonitor::getInstance().alert(subject, content);

    //&#x7B49;&#x5F85;&#x62A5;&#x8B66;&#x90AE;&#x4EF6;&#x7EBF;&#x7A0B;&#x9000;&#x51FA;
    MailMonitor::getInstance().wait();

    return 0;
}
</code></pre><p>&#x4E0A;&#x8FF0;&#x4EE3;&#x7801;&#x4F7F;&#x7528;&#x4E86; 163 &#x90AE;&#x7BB1;&#x8D26;&#x53F7; testformybook@163.com &#x7ED9; QQ &#x90AE;&#x7BB1;&#x8D26;&#x6237; balloonwj@qq.com &#x548C; analogous_love@qq.com &#x5206;&#x522B;&#x53D1;&#x9001;&#x90AE;&#x4EF6;&#xFF0C;&#x53D1;&#x9001;&#x7ED9;&#x90AE;&#x4EF6;&#x7684;&#x51FD;&#x6570;&#x662F; MailMonitor::alert() &#x51FD;&#x6570;&#xFF0C;&#x5B9E;&#x9645;&#x53D1;&#x9001;&#x90AE;&#x4EF6;&#x7684;&#x51FD;&#x6570;&#x662F; SmtpSocket::send() &#x51FD;&#x6570;&#x3002;</p>
<p>&#x65E0;&#x8BBA;&#x5728; Windows &#x6216;&#x8005; Linux &#x4E0A;&#x7F16;&#x8BD1;&#x8FD0;&#x884C;&#x7A0B;&#x5E8F;&#xFF0C;&#x6211;&#x4EEC;&#x7684;&#x4E24;&#x4E2A;&#x90AE;&#x7BB1;&#x90FD;&#x4F1A;&#x5206;&#x522B;&#x6536;&#x5230;&#x4E24;&#x5C01;&#x90AE;&#x4EF6;&#xFF0C;&#x5982;&#x4E0B;&#x56FE;&#x6240;&#x793A;&#xFF1A;</p>
<p><img src="../imgs/mail2.png" alt="img"></p>
<p><img src="../imgs/mail3.png" alt="img"></p>
<p>&#x4EA7;&#x751F;&#x7B2C;&#x4E00;&#x5C01;&#x90AE;&#x4EF6;&#x7684;&#x539F;&#x56E0;&#x662F;&#x6211;&#x4EEC;&#x5728; main &#x51FD;&#x6570;&#x4E2D;&#x8C03;&#x7528; MailMonitor::getInstance().initMonitorMailInfo() &#x521D;&#x59CB;&#x5316;&#x90AE;&#x7BB1;&#x670D;&#x52A1;&#x5668;&#x540D;&#x3001;&#x5730;&#x5740;&#x3001;&#x7AEF;&#x53E3;&#x53F7;&#x3001;&#x7528;&#x6237;&#x540D;&#x548C;&#x5BC6;&#x7801;&#x65F6;&#xFF0C;MailMonitor::initMonitorMailInfo() &#x51FD;&#x6570;&#x5185;&#x90E8;&#x4F1A;&#x8C03;&#x7528; SmtpSocket::sendMail() &#x51FD;&#x6570;&#x53D1;&#x9001;&#x4E00;&#x5C01;&#x90AE;&#x4EF6;&#x901A;&#x77E5;&#x6307;&#x5B9A;&#x8054;&#x7CFB;&#x4EBA;&#x90AE;&#x4EF6;&#x62A5;&#x8B66;&#x7CFB;&#x7EDF;&#x5DF2;&#x7ECF;&#x542F;&#x52A8;&#xFF1A;</p>
<pre class="language-"><code>bool MailMonitor::initMonitorMailInfo(const std::string&amp; servername, const std::string&amp; mailserver, short mailport, const std::string&amp; mailfrom, const std::string&amp; mailfromPassword, const std::string&amp; mailto)
{
    //...&#x65E0;&#x5173;&#x4EE3;&#x7801;&#x7701;&#x7565;...

    SmtpSocket::sendMail(m_strMailServer, m_nMailPort, m_strFrom, m_strFromPassword, m_strMailTo, osSubject.str(), &quot;You have started Mail Alert System.&quot;);

    return true;
}
</code></pre><p>&#x4EA7;&#x751F;&#x7B2C;&#x4E8C;&#x5C01;&#x90AE;&#x4EF6;&#x5219;&#x662F;&#x6211;&#x4EEC;&#x5728; main &#x51FD;&#x6570;&#x4E2D;&#x4E3B;&#x52A8;&#x8C03;&#x7528;&#x4EA7;&#x751F;&#x62A5;&#x8B66;&#x90AE;&#x4EF6;&#x7684;&#x51FD;&#x6570;&#xFF1A;</p>
<pre class="language-"><code>const std::string subject = &quot;Alert Mail&quot;;
const std::string content = &quot;This is an alert mail from &quot; + mailuser;
MailMonitor::getInstance().alert(subject, content);
</code></pre><p>&#x6211;&#x4EEC;&#x4EE5;&#x7B2C;&#x4E00;&#x5C01;&#x90AE;&#x4EF6;&#x4E3A;&#x4F8B;&#x6765;&#x8BF4;&#x660E;&#x6574;&#x4E2A;&#x90AE;&#x4EF6;&#x53D1;&#x9001;&#x8FC7;&#x7A0B;&#x4E2D;&#xFF0C;&#x6211;&#x4EEC;&#x7684;&#x7A0B;&#x5E8F;&#xFF08;&#x5BA2;&#x6237;&#x7AEF;&#xFF09;&#x4E0E; 163 &#x90AE;&#x4EF6;&#x670D;&#x52A1;&#x5668;&#x4E4B;&#x95F4;&#x7684;&#x534F;&#x8BAE;&#x6570;&#x636E;&#x7684;&#x4EA4;&#x6362;&#x5185;&#x5BB9;&#xFF0C;&#x6838;&#x5FC3;&#x7684;&#x90AE;&#x4EF6;&#x53D1;&#x9001;&#x529F;&#x80FD;&#x5728; SmtpSocket::sendMail() &#x51FD;&#x6570;&#x4E2D;&#xFF1A;</p>
<pre class="language-"><code>bool SmtpSocket::sendMail(const std::string&amp; server, short port, const std::string&amp; from, const std::string&amp; fromPassword, 
                          const std::vector<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token namespace">std:</span>:string</span><span class="token punctuation">&gt;</span></span>&amp; to, const std::string&amp; subject, const std::string&amp; mailData)
{
    size_t atSymbolPos = from.find_first_of(&quot;@&quot;);
    if (atSymbolPos == std::string::npos)
        return false;

    std::string strUser = from.substr(0, atSymbolPos);

    SmtpSocket smtpSocket;
    //smtp.163.com 25
    if (!smtpSocket.connect(server.c_str(), port))
        return false;

    //testformybook 2019hhxxttxs
    if (!smtpSocket.logon(strUser.c_str(), fromPassword.c_str()))
        return false;

    //testformybook@163.com 
    if (!smtpSocket.setMailFrom(from.c_str()))
        return false;

    if (!smtpSocket.setMailTo(to))
        return false;

    if (!smtpSocket.send(subject, mailData))
        return false;

    return true;
}
</code></pre><p>&#x8FD9;&#x4E2A;&#x51FD;&#x6570;&#x5148;&#x521B;&#x5EFA; socket&#xFF0C;&#x518D;&#x4F7F;&#x7528;&#x90AE;&#x7BB1;&#x7684;&#x5730;&#x5740;&#x548C;&#x7AEF;&#x53E3;&#x540E;&#x53BB;&#x8FDE;&#x63A5;&#x670D;&#x52A1;&#x5668;&#xFF08;smtpSocket.connect() &#x51FD;&#x6570;&#x5185;&#x90E8;&#x989D;&#x5916;&#x505A;&#x4E86;&#x4E00;&#x6B65;&#x5C06;&#x57DF;&#x540D;&#x89E3;&#x6790;&#x6210; ip &#x5730;&#x5740;&#x7684;&#x5DE5;&#x4F5C;&#xFF09;&#xFF0C;&#x8FDE;&#x63A5;&#x6210;&#x529F;&#x540E;&#x5F00;&#x59CB;&#x548C;&#x670D;&#x52A1;&#x5668;&#x7AEF;&#x8FDB;&#x884C;&#x6570;&#x636E;&#x4EA4;&#x6362;&#xFF1A;</p>
<pre class="language-"><code>client: &#x5C1D;&#x8BD5;&#x8FDE;&#x63A5;&#x670D;&#x52A1;&#x5668;
client: &#x8FDE;&#x63A5;&#x6210;&#x529F;
server: 220\r\n

client: helo&#x81EA;&#x5B9A;&#x4E49;&#x95EE;&#x5019;&#x8BED;\r\n
server: 250\r\n

client: AUTH LOGIN\r\n
server: 334\r\n

client: base64&#x7F16;&#x7801;&#x540E;&#x7684;&#x7528;&#x6237;&#x540D;\r\n
server: 334\r\n

client: base64&#x7F16;&#x7801;&#x540E;&#x7684;&#x5BC6;&#x7801;\r\n
server: 235\r\n

client: MAIL FROM:<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>&#x53D1;&#x4EF6;&#x4EBA;&#x5730;&#x5740;</span><span class="token punctuation">&gt;</span></span>\r\n
server: 250\r\n

client: rcpt to:<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>&#x6536;&#x4EF6;&#x4EBA;&#x5730;&#x5740;1</span><span class="token punctuation">&gt;</span></span>\r\n
server: 250\r\n

client: rcpt to:<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>&#x6536;&#x4EF6;&#x4EBA;&#x5730;&#x5740;2</span><span class="token punctuation">&gt;</span></span>\r\n
server: 250\r\n

client: DATA\r\n
server: 354\r\n

client: &#x90AE;&#x4EF6;&#x6B63;&#x6587;\r\n.\r\n
server: 250\r\n

client&#xFF1A;QUIT\r\n
server&#xFF1A;221\r\n
</code></pre><p>&#x6211;&#x4EEC;&#x5C06;&#x4E0A;&#x8FF0;&#x8FC7;&#x7A0B;&#x7ED8;&#x5236;&#x6210;&#x5982;&#x4E0B;&#x793A;&#x610F;&#x56FE;&#xFF1A;</p>
<p><img src="../imgs/mail4.png" alt=""></p>
<p>&#x6700;&#x7EC8;&#x90AE;&#x4EF6;&#x5C31;&#x53D1;&#x51FA;&#x53BB;&#x4E86;&#xFF0C;&#x8FD9;&#x91CC;&#x6211;&#x4EEC;&#x6A21;&#x62DF;&#x4E86;&#x5BA2;&#x6237;&#x7AEF;&#x4F7F;&#x7528; smtp &#x534F;&#x8BAE;&#x7ED9;&#x670D;&#x52A1;&#x5668;&#x7AEF;&#x53D1;&#x9001;&#x90AE;&#x4EF6;&#xFF0C;&#x6211;&#x4EEC;&#x81EA;&#x5DF1;&#x5B9E;&#x73B0;&#x670D;&#x52A1;&#x5668;&#x7AEF;&#x63A5;&#x6536;&#x5BA2;&#x6237;&#x7AEF;&#x53D1;&#x9001;&#x7684;&#x90AE;&#x4EF6;&#x8BF7;&#x6C42;&#x4E5F;&#x662F;&#x4E00;&#x6837;&#x7684;&#x9053;&#x7406;&#x3002;&#x8FD9;&#x5C31;&#x662F; SMTP &#x534F;&#x8BAE;&#x7684;&#x683C;&#x5F0F;&#xFF0C;SMTP &#x534F;&#x8BAE;&#x662F;&#x4EE5;&#x7279;&#x5B9A;&#x6807;&#x8BB0;&#x4F5C;&#x4E3A;&#x5206;&#x9694;&#x7B26;&#x7684;&#x534F;&#x8BAE;&#x683C;&#x5F0F;&#x5178;&#x578B;&#x3002;</p>
<blockquote>
<p>&#x8BFB;&#x8005;&#x53EF;&#x4EE5;&#x5728; Windows &#x4E0A;&#x6216;&#x8005; Linux &#x4E3B;&#x673A;&#x4E0A;&#x6D4B;&#x8BD5;&#x4E0A;&#x8FF0;&#x7A0B;&#x5E8F;&#xFF0C;&#x5982;&#x679C;&#x8BFB;&#x8005;&#x5728;&#x963F;&#x91CC;&#x4E91;&#x8FD9;&#x6837;&#x7684;&#x4E91;&#x4E3B;&#x673A;&#x4E0A;&#x6D4B;&#x8BD5;&#xFF0C;&#x963F;&#x91CC;&#x4E91;&#x7B49;&#x4E91;&#x4E3B;&#x673A;&#x4E3A;&#x4E86;&#x907F;&#x514D;&#x5728;&#x7F51;&#x7EDC;&#x4E0A;&#x4EA7;&#x751F;&#x5927;&#x91CF;&#x5783;&#x573E;&#x90AE;&#x4EF6;&#x9ED8;&#x8BA4;&#x662F;&#x7981;&#x6B62;&#x53D1;&#x5F80;&#x5176;&#x4ED6;&#x670D;&#x52A1;&#x5668;&#x7684; 25 &#x53F7;&#x7AEF;&#x53E3;&#x7684;&#x6570;&#x636E;&#x7684;&#xFF0C;&#x8BFB;&#x8005;&#x9700;&#x8981;&#x7533;&#x8BF7;&#x89E3;&#x9664;&#x8BE5;&#x7AEF;&#x53E3;&#x9650;&#x5236;&#xFF0C;&#x6216;&#x8005;&#x5C06;&#x90AE;&#x4EF6;&#x670D;&#x52A1;&#x5668;&#x7684; 25 &#x7AEF;&#x53E3;&#x6539;&#x6210;&#x5176;&#x4ED6;&#x7AEF;&#x53E3;&#xFF08;&#x4E00;&#x822C;&#x6539;&#x6210; 465 &#x7AEF;&#x53E3;&#xFF09;&#x3002;</p>
</blockquote>
<p>&#x5B8C;&#x6574;&#x7684;&#x53D1;&#x9001;&#x90AE;&#x4EF6;&#x7F16;&#x89E3;&#x7801; SMTP &#x534F;&#x8BAE;&#x793A;&#x4F8B;&#x4EE3;&#x7801;&#x8BF7;&#x5728;&#x3010;<strong>&#x9AD8;&#x6027;&#x80FD;&#x670D;&#x52A1;&#x5668;&#x5F00;&#x53D1;&#x3011;</strong>&#x516C;&#x4F17;&#x53F7;&#x540E;&#x53F0;&#x56DE;&#x590D;&#x5173;&#x952E;&#x5B57;&#x201C;<strong>SMTP</strong>&#x201D;&#x3002;</p>
<p>&#x4E0A;&#x6587;&#x6211;&#x4EEC;&#x4ECB;&#x7ECD;&#x4E86; SMTP &#x534F;&#x8BAE;&#x5E38;&#x7528;&#x7684;&#x534F;&#x8BAE;&#x547D;&#x4EE4;&#xFF0C;SMTP &#x534F;&#x8BAE;&#x652F;&#x6301;&#x7684;&#x5B8C;&#x6574;&#x547D;&#x4EE4;&#x5217;&#x8868;&#x8BFB;&#x8005;&#x53EF;&#x4EE5;&#x53C2;&#x8003; rfc5321 &#x6587;&#x6863;&#xFF1A;<a href="https://tools.ietf.org/html/rfc5321" target="_blank">https://tools.ietf.org/html/rfc5321</a> &#x3002;</p>
<h4 id="pop3-&#x534F;&#x8BAE;"><a name="pop3-&#x534F;&#x8BAE;" class="anchor-navigation-ex-anchor" href="#pop3-&#x534F;&#x8BAE;"><i class="fa fa-link" aria-hidden="true"></i></a>POP3 &#x534F;&#x8BAE;</h4>
<p>&#x6211;&#x4EEC;&#x518D;&#x6765;&#x770B;&#x4E0B; POP3 &#x534F;&#x8BAE;&#xFF1A;</p>
<pre class="language-"><code>client&#xFF1A;&#x8FDE;&#x63A5;&#x90AE;&#x7BB1;pop&#x670D;&#x52A1;&#x5668;&#xFF0C;&#x8FDE;&#x63A5;&#x6210;&#x529F;
server&#xFF1A;+OK Welcome to coremail Mail Pop3 Server (163coms[10774b260cc7a37d26d71b52404dcf5cs])\r\n

client&#xFF1A;USER &#x7528;&#x6237;&#x540D;\r\n
server&#xFF1A;+OK core mail

client&#xFF1A;PASS &#x5BC6;&#x7801;\r\n
server&#xFF1A;+OK 202 message(s) [3441786 byte(s)]\r\n

client&#xFF1A;LIST\r\n
server&#xFF1A;+OK 5 30284\r\n1 8284\r\n2 11032\r\n3 2989\r\n4 3871\r\n5 4108\r\n.\r\n

client&#xFF1A;RETR 100\r\n
server&#xFF1A;
+OK 4108 octets\r\n
Received: from sonic310-21.consmr.mail.gq1.yahoo.com (unknown [98.137.69.147])
by mx29 (Coremail) with SMTP id T8CowABHlztmml5erAoHAQ--.23443S3;
Wed, 04 Mar 2020 01:56:57 +0800 (CST)\r\n
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1583258213; bh=ABL3sF+YL/syl+mwknwxiAlvKPRNYq4AYTujNrPA86g=; h=Date:From:Reply-To:Subject:References:From:Subject;\r\n
b=OrAQTs0GJnA9yVA08gRolpsoe9E2PQhc3BLvK0msqlZkIYPYVLD1SHAHc7eI3imH4b+hggrFA6wUeiSqqq2du3tOokCU8ckq3LrbdI82EZ013M3KL6o2y+/wdPIj9Mo1TeGbmqtthYBOpGvEgwzsQMNnydkJdy5tDaW6IBT2Ux+IaP0K+jp71eYXcWjdR0mSyu3aMhLqc0z4l5HlZYpZRQG1hjxZOaCH/UjgBAdr98JecVvuRp4s5iGe6OIxc0p3xzRZBxTlLdgdHjmTKHQ00eTNCfFYai2rMxf4830lMYTwKI6O/iu3jUbTA2yjxx0LrYBFTiWzFetwAQupKLw3Qg==\r\n
X-YMail-OSG: 7HG016cVM1nEI.fdz8BF9PN3tO6MvrppAOwu_jpQ09s4eVdYvLXavghvjDvWrRW
B7PF6pZKuhiLjV7yCErxEmbWUKPLzX.WL4RJ9u4tnPC4NyVp30cLaoGZVIapWeFtqRpKlh31orVY
WTsWE9FcDuHts5p2MPAd7Si52EZfyPuoffEIWrd481hx1IdSsRQN_V7mpfxihvReOIoQ5rCWuMzd
oK5kXOho8iOwXlEVPzdTs33RD5rQmwbycPtLS7.FARNxWl9yO9Lrd25gDYa1hXvgG4aQptJQK5aD
cHQpZUYqdiaNUaEoGoIDQR_HVndus53gTyzUzmJONpDo6wQM39O.pih7VGCrgLqB2_hHeJdPEUIk
jCcwkqNn0cfDyc4QwBdQ65jcgm2cJDPFgoODhxDIqTqeFVbXFr2cXLand8vAqARi3tlnmsOUA7ZI
DiSvhSx8eYGd4_frX1LfP.TpctO9Uuc3ZP6iP_K24F9HE9HNN9_swBUEPlBOB3jjSPSOdmiEMteF
NWj1qOJ8i47BwMBILtx0dZheRRSxvfzSA.JmnUghFo80EgaGRgXYIEAzt8hpvxdZbtwrg0k0WPeF
Y4LC2my.A9XcsnF58558bweJDaDHCJyLGFnE8__ZQI163vMPqY6QbU3OP0EJz2OE1rPBOrq9PUol
TZjOEu6ghV1PG2HhX0Ydc.vvq5mloqbKusdzV5EgtpFZjLdp1_RQWuI1LG865Ig756HBaozMU6RG
0FUMn86pvXRBbNMPD6ADwcw4rdw.Xqk5TRZkqJpSp6KX82OjAgFu0xxMiZnQ7LNemrsJ2UQK9Y2_
nm8nrwOIX03Ol6Z2KspWUcPNkqPIZ6vGAr9FO9qqE_elB3K4hh04lq_KS5Tv_XoI3deD4r3J6RTb
O9xp5O6cbe0Svy7FS7DosvJfK958_57Kk_6vk6wxxc3D8cx_k6P.yPbphTCLYFdfnbV5sRKNvUKT
.apHpO8d0GUf29QtSc3dwBDrLEcRSpguJ3tMKBc2GZPCwUMOgf2b24zFZ49.D7MRQbZifaHsk4dJ
L9jxS2qdN5pSjhZUjbLCUQ2YGcYgmNnTbfjAIaxqUWNSgpypIYNmi.lgG4bM_gW7sXH_Y3TULcsC
.1GXTSjZUdUvvkr7BDnzUy3FGqv9Eyfb7GOwPzTXLzdurcd6eHx0ejCmC6gVJIwoIh9S0YSK659a
K2usThSAyogrxqQ664fZr70CrLJehr5OZNLstPt3fiJhyUR1DXrlm6myQ9uSQ5vPTl0p2.DemDaY
k84mtcZO0EEjKIzqeSvZ505Fex0u.66Mzu2lmr07WwMCE7wgqwOSWRnYNCz2rWcLmXA_TVDtdJ85
bHZ79FY6Vs5pGJjp.7YgDnVqysBp95w--\r\n
Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.gq1.yahoo.com with HTTP; Tue, 3 Mar 2020 17:56:53 +0000\r\n
Date: Tue, 3 Mar 2020 17:56:49 +0000 (UTC)\r\n
From: Peter Edward Copley <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>noodlelife@yahoo.com</span><span class="token punctuation">&gt;</span></span>\r\n
Reply-To: Peter Edward Copley <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>pshun3592@gmail.com</span><span class="token punctuation">&gt;</span></span>\r\n
Message-ID: &lt;729348196.5391236.1583258209467@mail.yahoo.com&gt;\r\n
Subject: Re:Hello\r\n
MIME-Version: 1.0\r\n
Content-Type: multipart/alternative; \r\n
boundary=&quot;----=_Part_5391235_1821490954.1583258209466&quot;\r\n
References: &lt;729348196.5391236.1583258209467.ref@mail.yahoo.com&gt;\r\n
X-Mailer: WebService/1.1.15302 YMailNorrin Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.122 Safari/537.36\r\n
X-CM-TRANSID:T8CowABHlztmml5erAoHAQ--.23443S3\r\n
Authentication-Results: mx29; spf=pass smtp.mail=noodlelife@yahoo.com;\r\n
dkim=pass header.i=@yahoo.com\r\n
X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73
VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxU-NtIUUUUU\r\n
\r\n
------=_Part_5391235_1821490954.1583258209466\r\n
.\r\n

client&#xFF1A;QUIT\r\n
server&#xFF1A;+OK core mail\r\n
</code></pre><p>&#x4E0A;&#x8FF0;&#x8FC7;&#x7A0B;&#x5982;&#x4E0B;&#x793A;&#x610F;&#x56FE;&#x6240;&#x793A;&#xFF1A;</p>
<p><img src="../imgs/mail5.png" alt=""></p>
<p>&#x5F53;&#x6211;&#x4EEC;&#x6536;&#x53D6;&#x90AE;&#x4EF6;&#x6B63;&#x6587;&#x4E4B;&#x540E;&#xFF0C;&#x6211;&#x4EEC;&#x5C31;&#x53EF;&#x4EE5;&#x6839;&#x636E;&#x90AE;&#x4EF6;&#x6B63;&#x6587;&#x4E2D;&#x7684;&#x5404;&#x79CD; tag &#x6765;&#x89E3;&#x6790;&#x90AE;&#x4EF6;&#x5185;&#x5BB9;&#x5F97;&#x5230;&#x90AE;&#x4EF6;&#x7684; MessageID&#x3001;&#x6536;&#x4EF6;&#x4EBA;&#x3001;&#x53D1;&#x4EF6;&#x4EBA;&#x3001;&#x90AE;&#x4EF6;&#x4E3B;&#x9898;&#x3001;&#x6B63;&#x6587;&#x548C;&#x9644;&#x4EF6;&#xFF0C;&#x6CE8;&#x610F;&#x9644;&#x4EF6;&#x5185;&#x5BB9;&#x4E5F;&#x4F1A;&#x88AB;&#x62C6;&#x6210;&#x7279;&#x5B9A;&#x7684;&#x7F16;&#x7801;&#x683C;&#x5F0F;&#x653E;&#x5728;&#x90AE;&#x4EF6;&#x4E2D;&#x3002;&#x90AE;&#x4EF6;&#x6B63;&#x6587;&#x91CC;&#x9762;&#x6309;&#x6240;&#x8C13;&#x7684; boundary &#x6765;&#x5206;&#x6210;&#x591A;&#x4E2A;&#x5757;&#xFF0C;&#x4F8B;&#x5982;&#x4E0A;&#x6587;&#x4E2D;&#x7684; <code>boundary=&quot;----=_Part_5391235_1821490954.1583258209466&quot;</code>&#x3002;</p>
<p>&#x6211;&#x4EEC;&#x6765;&#x770B;&#x4E00;&#x4E2A;&#x5177;&#x4F53;&#x7684;&#x4F8B;&#x5B50;&#x5427;&#x3002;</p>
<p><img src="../imgs/mail6.png" alt=""></p>
<p>&#x4E0A;&#x8FF0;&#x90AE;&#x4EF6;&#x7684;&#x4E3B;&#x9898;&#x662F;&#x201C;&#x6D4B;&#x8BD5;&#x90AE;&#x4EF6;&#x201D;&#xFF0C;&#x5185;&#x5BB9;&#x662F;&#x7EAF;&#x6587;&#x672C;&#x201C;&#x8FD9;&#x662F;&#x4E00;&#x5C01;&#x6D4B;&#x8BD5;&#x90AE;&#x4EF6;&#xFF0C;&#x542B;&#x6709;&#x4E24;&#x4E2A;&#x9644;&#x4EF6;&#x3002;&#x201D;&#xFF0C;&#x8FD8;&#x6709;&#x4E24;&#x4E2A;&#x9644;&#x4EF6;&#xFF0C;&#x4E00;&#x5F20;&#x540D;&#x4E3A; self.jpg &#x7684;&#x56FE;&#x7247;&#xFF0C;&#x4E00;&#x4E2A;&#x540D;&#x4E3A; test.docx &#x7684;&#x6587;&#x6863;&#x3002;&#x6211;&#x4EEC;&#x5C06;&#x90AE;&#x4EF6;&#x4E0B;&#x8F7D;&#x4E0B;&#x6765;&#x540E;&#x5F97;&#x5230;&#x90AE;&#x4EF6;&#x539F;&#x6587;&#x662F;&#xFF1A;</p>
<pre class="language-"><code>+OK 93763 octets
Received: from qq.com (unknown [183.3.226.165])
    by mx27 (Coremail) with SMTP id TcCowABHJo+dMqReI+72Bg--.18000S3;
    Sat, 25 Apr 2020 20:52:45 +0800 (CST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512;
    t=1587819165; bh=RLNDml5+GusG7KQTgkjeS/Mpn1m/LmqBUaz6Nmo6ukY=;
    h=From:To:Subject:Mime-Version:Date:Message-ID;
    b=K3sJK+aPQ9zHu1GUvKckofm3cfocpze10XBp9FufVVVYS423myQnFWMaREpGGbeaS
     vrCGdjawcfhXpkvGZnhOkJZrtut1er5zWZRkmsDnqvoekRURXKt3wWyOv5WUuSPHZI
     NzGjMQbtYmbWjFla7zs1Cg81UQKRtg1s5KxWwGVQ=
X-QQ-FEAT: CPmoSFXLZ/TSSc3nxNJn8bUc57myjtkH8mxkmSC9/G9nP1mNDXcYVAAERmmiE
    038rlXj8w6qkTmh1317bdJp9MqMMEUSgpJC5DulJn4k6WCURo4NEYDiuUQK/J+YfUQnpETt
    w4aQYpj6nKAIqKgorGGK0zy6oQWavfOgssyvSU15d6wqlw904x6aZhS3KAUAM4+eGitBRk9
    fxUEABnV/opGuLtZ/fex+UsUAVgXFbTZPoYjhxoM4ZKJsDEJ38x/9QHR1FymBebmAvNzzbB
    JT45M4OYwynKE/mrFR1FPSeXA=
X-QQ-SSF: 00010000000000F000000000000000Z
X-HAS-ATTACH: no
X-QQ-BUSINESS-ORIGIN: 2
X-Originating-IP: 255.21.142.175
X-QQ-STYLE: 
X-QQ-mid: webmail504t1587819163t7387219
From: &quot;=?gb18030?B?1/PRp7fG?=&quot; <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>balloonwj@qq.com</span><span class="token punctuation">&gt;</span></span>
To: &quot;=?gb18030?B?dGVzdGZvcm15Ym9vaw==?=&quot; <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>testformybook@163.com</span><span class="token punctuation">&gt;</span></span>
Subject: =?gb18030?B?suLK1NPKvP4=?=
Mime-Version: 1.0
Content-Type: multipart/mixed;
    boundary=&quot;----=_NextPart_5EA4329B_0FBAC2B8_51634C9D&quot;
Content-Transfer-Encoding: 8Bit
Date: Sat, 25 Apr 2020 20:52:43 +0800
X-Priority: 3
Message-ID: <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>tencent_855A7727508F28D762951979338305E06B08@qq.com</span><span class="token punctuation">&gt;</span></span>
X-QQ-MIME: TCMime 1.0 by Tencent
X-Mailer: QQMail 2.x
X-QQ-Mailer: QQMail 2.x
X-QQ-SENDSIZE: 520
Received: from qq.com (unknown [127.0.0.1])
    by smtp.qq.com (ESMTP) with SMTP
    id ; Sat, 25 Apr 2020 20:52:44 +0800 (CST)
Feedback-ID: webmail:qq.com:bgweb:bgweb16
X-CM-TRANSID:TcCowABHJo+dMqReI+72Bg--.18000S3
Authentication-Results: mx27; spf=pass smtp.mail=balloonwj@qq.com; dki
    m=pass header.i=@qq.com
X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73
    VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxU-LIDUUUUU

This is a multi-part message in MIME format.

------=_NextPart_5EA4329B_0FBAC2B8_51634C9D
Content-Type: multipart/alternative;
    boundary=&quot;----=_NextPart_5EA4329B_0FBAC2B8_71508FA9&quot;;

------=_NextPart_5EA4329B_0FBAC2B8_71508FA9
Content-Type: text/plain;
    charset=&quot;gb18030&quot;
Content-Transfer-Encoding: base64

1eLKx9K7t+Ky4srU08q8/qOsuqzT0MG9uPa4vbz+oaM=

------=_NextPart_5EA4329B_0FBAC2B8_71508FA9
Content-Type: text/html;
    charset=&quot;gb18030&quot;
Content-Transfer-Encoding: base64

PG1ldGEgaHR0cC1lcXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7IGNo
YXJzZXQ9R0IxODAzMCI+PGRpdj7V4srH0ru34rLiytTTyrz+o6y6rNPQwb249ri9vP6hozwv
ZGl2Pg==

------=_NextPart_5EA4329B_0FBAC2B8_71508FA9--

------=_NextPart_5EA4329B_0FBAC2B8_51634C9D
Content-Type: application/octet-stream;
    charset=&quot;gb18030&quot;;
    name=&quot;self.jpg&quot;
Content-Disposition: attachment; filename=&quot;self.jpg&quot;
Content-Transfer-Encoding: base64

/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRof
Hh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwh
MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAAR
CAEXAR8DASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAA
AgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkK
FhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWG
h4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl
5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREA
AgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYk
NOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOE
hYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk
3nOqryf+eEvH/jlX4PHfhIS&#xFF08;&#x9650;&#x4E8E;&#x7BC7;&#x5E45;&#xFF0C;&#x7701;&#x53BB;&#x90E8;&#x5206;&#x5185;&#x5BB9;...&#xFF09;F11n5mOMG3lwMf8AAKKKmOxDKeq+PPDtxPA0OuBIYz+8T7PL8/8A45Uj/ETwzDCWOqqV64EE
v/xFFFO5q3eIknj7wy8AH9qrsccjyJeP/HKhsvGHhWyT93qwyflX9xLwP++KKKaqS5TFxVwv
PiBoLRMbTUonkzgBoJQPr9ysXWvGGg30kVumpqoLh2byZP8A4iiikpNS0GtjpNM8c+FraHB1
f/yBL/8AEVej+InhUf8AMWXGf+feX/4iiihslmVrPj3wzLGETVlPPeCX/wCIrMl8YeH5rdBD
rCLInIzBL/8AEUUU7msNyRPGugi2/eaohbG5R5EnHt9ym3vjPw3JZAHUtp2hvlhk6/8AfFFF
RzNNWJfvT1Kz+LvDctsBHqW0p0Bik/8AiKrr4v0HH/H+P+/Mn+FFFZz3Gf/Z

------=_NextPart_5EA4329B_0FBAC2B8_51634C9D
Content-Type: application/octet-stream;
    charset=&quot;gb18030&quot;;
    name=&quot;test.docx&quot;
Content-Disposition: attachment; filename=&quot;test.docx&quot;
Content-Transfer-Encoding: base64

UEsDBBQABgAIAAAAIQCshlBXjgEAAMAFAAATAAgCW0NvbnRlbnRfVHlwZXNdLnhtbCCiBAIo
oAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAA&#xFF08;&#x9650;&#x4E8E;&#x7BC7;&#x5E45;&#xFF0C;&#x7701;&#x53BB;&#x90E8;&#x5206;&#x5185;&#x5BB9;...&#xFF09;
V5cAEAAOECAAARAAAAAAAAAAAAAAAAAHyyAABk
b2NQcm9wcy9jb3JlLnhtbFBLAQItABQABgAIAAAAIQAKRdqw1gcAAGM8AAAPAAAAAAAAAAAA
AAAAACO1AAB3b3JkL3N0eWxlcy54bWxQSwECLQAUAAYACAAAACEAISmu3xsCAADFBQAAEgAA
AAAAAAAAAAAAAAAmvQAAd29yZC9mb250VGFibGUueG1sUEsBAi0AFAAGAAgAAAAhAMB9S4Zw
AQAAxQIAABAAAAAAAAAAAAAAAAAAcb8AAGRvY1Byb3BzL2FwcC54bWxQSwUGAAAAAA0ADQBM
AwAAF8IAAAAA

------=_NextPart_5EA4329B_0FBAC2B8_51634C9D--
.
</code></pre><p>&#x6211;&#x4EEC;&#x5982;&#x4F55;&#x53BB;&#x89E3;&#x6790;&#x8FD9;&#x6837;&#x7684;&#x90AE;&#x4EF6;&#x683C;&#x5F0F;&#x5462;&#xFF1F;</p>
<p>&#x8FD9;&#x5C01;&#x90AE;&#x4EF6;&#x5185;&#x5BB9;&#x4E3B;&#x8981;&#x7531;&#x4E24;&#x90E8;&#x5206;&#x7EC4;&#x6210;&#xFF0C;&#x7B2C;&#x4E00;&#x90E8;&#x5206;&#x662F;&#x201C;OK&#x201D;&#x5173;&#x952E;&#x5B57;&#xFF0C;&#x7B2C;&#x4E8C;&#x90E8;&#x5206;&#x662F;&#x90AE;&#x4EF6;&#x5185;&#x5BB9;&#xFF0C;&#x90AE;&#x4EF6;&#x5185;&#x5BB9;&#x4EE5; <strong>&#x70B9; + \r\n</strong> &#x7ED3;&#x675F;&#x3002;&#x5176;&#x4E2D;&#x90AE;&#x4EF6;&#x5185;&#x5BB9;&#x4E2D;&#x524D;&#x9762;&#x4E00;&#x90E8;&#x5206;&#x662F;&#x4E00;&#x4E2A;&#x7684; tag &#x548C; tag &#x503C;&#xFF0C;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x4ECE;&#x8FD9;&#x4E9B; tag &#x4E2D;&#x5F97;&#x5230;&#x90AE;&#x4EF6;&#x7684; MessageID&#x3001;&#x6536;&#x4EF6;&#x4EBA;&#x59D3;&#x540D;&#x548C;&#x5730;&#x5740;&#x3001;&#x53D1;&#x4EF6;&#x4EBA;&#x59D3;&#x540D;&#x548C;&#x5730;&#x5740;&#x3001;&#x90AE;&#x4EF6;&#x4E3B;&#x9898;&#xFF0C;&#x4F8B;&#x5982;&#xFF1A;</p>
<pre class="language-"><code>From: &quot;=?gb18030?B?1/PRp7fG?=&quot; <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>balloonwj@qq.com</span><span class="token punctuation">&gt;</span></span>
To: &quot;=?gb18030?B?dGVzdGZvcm15Ym9vaw==?=&quot; <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>testformybook@163.com</span><span class="token punctuation">&gt;</span></span>
Subject: =?gb18030?B?suLK1NPKvP4=?=
Date: Sat, 25 Apr 2020 20:52:43 +0800
Message-ID: <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>tencent_855A7727508F28D762951979338305E06B08@qq.com</span><span class="token punctuation">&gt;</span></span>
</code></pre><p>&#x5176;&#x4E2D;&#x50CF;&#x90AE;&#x4EF6;&#x7684;&#x6536;&#x53D1;&#x4EBA;&#x59D3;&#x540D;&#xFF08;From &#x548C; To&#xFF09;&#x4F7F;&#x7528;&#x4E86; base64 &#x7F16;&#x7801;&#xFF0C;&#x6211;&#x4EEC;&#x4F7F;&#x7528; base64 &#x89E3;&#x7801;&#x5373;&#x53EF;&#x8FD8;&#x539F;&#x5176;&#x5185;&#x5BB9;&#x3002;</p>
<p><code>Content-Type: multipart/mixed;</code> &#x8BF4;&#x660E;&#x90AE;&#x4EF6;&#x6709;&#x591A;&#x4E2A;&#x90E8;&#x5206;&#x7EC4;&#x6210;&#x3002;</p>
<p>&#x6211;&#x4EEC;&#x5148;&#x6839;&#x636E;<code>boundary=&quot;----=_NextPart_5EA4329B_0FBAC2B8_71508FA9&quot;;</code>&#x4E2D;&#x6307;&#x5B9A;&#x7684; <code>----=_NextPart_5EA4329B_0FBAC2B8_71508FA9</code> &#x5206;&#x9694;&#x7B26;&#x5F97;&#x5230;&#x9664;&#x4E86;&#x90AE;&#x4EF6;&#x9644;&#x4EF6;&#x5185;&#x5BB9;&#x5916;&#x7684;&#x90AE;&#x4EF6;&#x6B63;&#x6587;&#x5185;&#x5BB9;&#xFF0C;&#x4E00;&#x5171;&#x6709;&#x4E24;&#x6BB5;&#xFF1A;</p>
<p><strong>&#x6B63;&#x6587;&#x6BB5;&#x4E00;</strong></p>
<pre class="language-"><code>Content-Type: text/plain;
    charset=&quot;gb18030&quot;
Content-Transfer-Encoding: base64

1eLKx9K7t+Ky4srU08q8/qOsuqzT0MG9uPa4vbz+oaM=
</code></pre><p>&#x8FD9;&#x6BB5;&#x5185;&#x5BB9;&#x4E3A;&#x7EAF;&#x6587;&#x672C;&#x683C;&#x5F0F;&#xFF08;text/plain&#xFF09;&#xFF0C;&#x4F7F;&#x7528; base64 &#x7F16;&#x7801;&#xFF0C;&#x5B57;&#x7B26;&#x96C6;&#x683C;&#x5F0F;&#x4E3A; gb18030&#xFF0C;&#x89E3;&#x7801;&#x4E4B;&#x540E;&#x5F97;&#x5230;&#x6B63;&#x6587;&#x5373;&#xFF1A;</p>
<p><img src="../imgs/mail7.png" alt=""></p>
<p><strong>&#x6B63;&#x6587;&#x6BB5;&#x4E8C;</strong></p>
<pre class="language-"><code>Content-Type: text/html;
    charset=&quot;gb18030&quot;
Content-Transfer-Encoding: base64

PG1ldGEgaHR0cC1lcXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7IGNo
YXJzZXQ9R0IxODAzMCI+PGRpdj7V4srH0ru34rLiytTTyrz+o6y6rNPQwb249ri9vP6hozwv
ZGl2Pg==
</code></pre><p>&#x8FD9;&#x6BB5;&#x5185;&#x5BB9;&#x4E3A;&#x5BCC;&#x6587;&#x672C;&#x683C;&#x5F0F;&#xFF08;text/html&#xFF09;&#xFF0C;&#x4F7F;&#x7528; base64 &#x7F16;&#x7801;&#xFF0C;&#x5B57;&#x7B26;&#x96C6;&#x683C;&#x5F0F;&#x4E3A; gb18030&#xFF0C;&#x89E3;&#x7801;&#x4E4B;&#x540E;&#x5F97;&#x5230;&#x6B63;&#x6587;&#x5373;&#x90AE;&#x4EF6;&#x4E2D;&#x7684;&#x90A3;&#x4E2A;&#x5E26;&#x8D85;&#x7EA7;&#x94FE;&#x63A5;&#x7684;&#x82F1;&#x8BED;&#x5E7F;&#x544A;&#xFF0C;&#x8FD9;&#x662F;&#x6211;&#x4F7F;&#x7528;&#x7684; 163 &#x90AE;&#x4EF6;&#x670D;&#x52A1;&#x5668;&#x81EA;&#x52A8;&#x63D2;&#x5165;&#x5230;&#x90AE;&#x4EF6;&#x6B63;&#x6587;&#x4E2D;&#x7684;&#xFF1A;</p>
<p><img src="../imgs/mail8.png" alt=""></p>
<p>&#x63A5;&#x4E0B;&#x6765;&#x5C31;&#x662F;&#x4E24;&#x4E2A;&#x9644;&#x4EF6;&#x7684;&#x5185;&#x5BB9;&#x4E86;&#xFF0C;&#x4F7F;&#x7528;&#x7684;&#x7F16;&#x7801;&#x683C;&#x5F0F;&#x4E5F;&#x662F; base64&#xFF0C;&#x6211;&#x4EEC;&#x4F7F;&#x7528; base64 &#x89E3;&#x7801;&#x8FD8;&#x539F;&#x6210; ASCII &#x5B57;&#x8282;&#x6D41;&#x540E;&#x4F5C;&#x4E3A;&#x6587;&#x4EF6;&#x7684;&#x5185;&#x5BB9;&#xFF0C;&#x518D;&#x53D6; tag &#x4E2D;&#x9644;&#x4EF6;&#x6587;&#x4EF6;&#x540D;&#x751F;&#x6210;&#x5BF9;&#x5E94;&#x7684;&#x6587;&#x4EF6;&#x5373;&#x53EF;&#x8FD8;&#x539F;&#x6210;&#x9644;&#x4EF6;&#x5185;&#x5BB9;&#x3002;</p>
<p>&#x5B8C;&#x6574;&#x7684;&#x90AE;&#x4EF6;&#x89E3;&#x7801;&#x53CA; POP3 &#x534F;&#x8BAE;&#x6536;&#x53D1;&#x793A;&#x4F8B;&#x4EE3;&#x7801;&#x8BF7;&#x5728;&#x3010;<strong>&#x9AD8;&#x6027;&#x80FD;&#x670D;&#x52A1;&#x5668;&#x5F00;&#x53D1;&#x3011;</strong>&#x516C;&#x4F17;&#x53F7;&#x540E;&#x53F0;&#x56DE;&#x590D;&#x5173;&#x952E;&#x5B57;&#x201C;<strong>POP3</strong>&#x201D;&#x3002;</p>
<p>&#x4E0A;&#x6587;&#x6211;&#x4EEC;&#x4ECB;&#x7ECD;&#x4E86; POP3 &#x534F;&#x8BAE;&#x5E38;&#x7528;&#x7684;&#x547D;&#x4EE4;&#xFF0C;POP3 &#x5B8C;&#x6574;&#x7684;&#x547D;&#x4EE4;&#x8BFB;&#x8005;&#x53EF;&#x4EE5;&#x53C2;&#x8003; rfc1939 &#x6587;&#x6863; <a href="https://tools.ietf.org/html/rfc1939&#x3002;" target="_blank">https://tools.ietf.org/html/rfc1939&#x3002;</a></p>
<h4 id="&#x90AE;&#x4EF6;&#x5BA2;&#x6237;&#x7AEF;"><a name="&#x90AE;&#x4EF6;&#x5BA2;&#x6237;&#x7AEF;" class="anchor-navigation-ex-anchor" href="#&#x90AE;&#x4EF6;&#x5BA2;&#x6237;&#x7AEF;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x90AE;&#x4EF6;&#x5BA2;&#x6237;&#x7AEF;</h4>
<p>&#x4E0A;&#x9762;&#x6211;&#x4EEC;&#x4ECB;&#x7ECD;&#x4E86; POP3 &#x548C; SMTP &#x534F;&#x8BAE;&#xFF0C;IMAP &#x4E0E;&#x6B64;&#x7C7B;&#x4F3C;&#x8FD9;&#x91CC;&#x5C31;&#x4E0D;&#x518D;&#x4ECB;&#x7ECD;&#x4E86;&#xFF0C;&#x8BFB;&#x8005;&#x53EF;&#x4EE5;&#x53C2;&#x8003; rfc3501&#xFF1A;<a href="https://tools.ietf.org/html/rfc3501" target="_blank">https://tools.ietf.org/html/rfc3501</a> &#x3002;</p>
<p>&#x9664;&#x4E86;&#x4E0A;&#x9762;&#x8BF4;&#x7684;&#x4E09;&#x79CD;&#x534F;&#x8BAE;&#xFF0C;&#x90AE;&#x4EF6;&#x8FD8;&#x6709;&#x4F7F;&#x7528; Exchange &#x534F;&#x8BAE;&#x7684;&#xFF0C;&#x5177;&#x4F53;&#x53EF;&#x4EE5;&#x53C2;&#x8003;&#x8FD9;&#x91CC;&#xFF1A;<a href="https://docs.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-asemail/f3d27369-e0f5-4164-aa5e-9b1abda16f5f&#x3002;" target="_blank">https://docs.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-asemail/f3d27369-e0f5-4164-aa5e-9b1abda16f5f&#x3002;</a></p>
<p>&#x5728;&#x7406;&#x89E3;&#x4E86;&#x4E0A;&#x8FF0;&#x90AE;&#x4EF6;&#x534F;&#x8BAE;&#x4E4B;&#x540E;&#xFF0C;&#x6211;&#x4EEC;&#x5C31;&#x53EF;&#x4EE5;&#x7F16;&#x5199;&#x81EA;&#x5DF1;&#x7684;&#x90AE;&#x4EF6;&#x5BA2;&#x6237;&#x7AEF;&#x4E86;&#xFF0C;&#x4E14;&#x53EF;&#x4EE5;&#x81EA;&#x7531;&#x5B9A;&#x5236;&#x90AE;&#x4EF6;&#x5C55;&#x793A;&#x529F;&#x80FD;&#xFF08;&#x5982;&#x4E0A;&#x6587;&#x4E2D; 163 &#x90AE;&#x7BB1;&#x5728;&#x6536;&#x5230;&#x7684;&#x90AE;&#x4EF6;&#x5185;&#x90E8;&#x63D2;&#x5165;&#x81EA;&#x5B9A;&#x4E49;&#x82F1;&#x8BED;&#x5E7F;&#x544A;&#xFF09;&#x3002;</p>
<footer class="page-footer"><span class="copyright">&#x5982;&#x9700;&#x4E0B;&#x8F7D;&#x672C;&#x7AD9;&#x5168;&#x90E8;&#x6280;&#x672F;&#x6587;&#x7AE0;&#xFF0C;&#x53EF;&#x4EE5;&#x5728;&#x3010;&#x9AD8;&#x6027;&#x80FD;&#x670D;&#x52A1;&#x5668;&#x5F00;&#x53D1;&#x3011;&#x516C;&#x4F17;&#x53F7;&#x56DE;&#x590D;&#x5173;&#x952E;&#x5B57;&#x201C;&#x6587;&#x7AE0;&#x4E0B;&#x8F7D;&#x201D;&#x5373;&#x53EF;&#x3002;</span><span class="footer-modification">&#x6700;&#x8FD1;&#x66F4;&#x65B0;&#x65F6;&#x95F4;&#xFF1A;
2020-10-02 21:50:52
</span></footer>
<script>console.log("plugin-popup....");document.onclick = function(e){ e.target.tagName === "IMG" && window.open(e.target.src,e.target.src)}</script><style>img{cursor:pointer}</style>
						
					</section>
					
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

				</div>
			</div>
			
		</div>

		
		
		<a href="从零实现一款12306刷票软件.html" class="navigation navigation-prev " aria-label="Previous page: 从零实现一款12306刷票软件">
			<i class="fa fa-angle-left"></i>
		</a>
		
		
		<a href="从零开发一个WebSocket服务器.html" class="navigation navigation-next " aria-label="Next page: 从零开发一个WebSocket服务器">
			<i class="fa fa-angle-right"></i>
		</a>
		
		
		
	</div>
	<script>
		var gitbook = gitbook || [];
		gitbook.push(function() {
			gitbook.page.hasChanged({"page":{"title":"从零实现一个邮件收发客户端","level":"5.1.3","depth":2,"next":{"title":"从零开发一个WebSocket服务器","level":"5.1.4","depth":2,"path":"articles/服务器开发案例实战/从零开发一个WebSocket服务器.md","ref":"articles/服务器开发案例实战/从零开发一个WebSocket服务器.md","articles":[]},"previous":{"title":"从零实现一款12306刷票软件","level":"5.1.2","depth":2,"path":"articles/服务器开发案例实战/从零实现一款12306刷票软件.md","ref":"articles/服务器开发案例实战/从零实现一款12306刷票软件.md","articles":[]},"dir":"ltr"},"config":{"plugins":["chapter-fold","-lunr","-search","search-pro","splitter","popup","back-to-top-button","hide-element","prism","-highlight","tbfed-pagefooter","code","anchor-navigation-ex","theme-fexa","livereload"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"如需下载本站全部技术文章，可以在【高性能服务器开发】公众号回复关键字“文章下载”即可。","modify_label":"最近更新时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"chapter-fold":{},"prism":{},"livereload":{},"splitter":{},"search-pro":{},"popup":{},"theme-fexa":{"search-placeholder":"输入关键字搜索","logo":"./logo.png","favicon":"./favicon.ico"},"code":{"copyButtons":true},"hide-element":{"elements":[".gitbook-link"]},"fontsettings":{"theme":"white","family":"sans","size":2},"anchor-navigation-ex":{"showLevel":false,"associatedWithSummary":true,"mode":"float","showGoTop":false,"printLog":false,"multipleH1":true,"float":{"floatIcon":"fa fa-navicon","showLevelIcon":false,"level1Icon":"","level2Icon":"","level3Icon":""},"pageTop":{"showLevelIcon":false,"level1Icon":"","level2Icon":"","level3Icon":""}},"back-to-top-button":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"easy_coder","pdf":{"pageBreaksBefore":"/","headerTemplate":null,"paperSize":"a4","margin":{"right":62,"left":62,"top":36,"bottom":36},"fontSize":12,"fontFamily":"Arial","footerTemplate":null,"chapterMark":"pagebreak","pageNumbers":false},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"isbn":"","variables":{},"title":"高性能服务器开发 技术专栏","links":{},"gitbook":"*","description":"","theme-default":{"showLevel":true},"extension":null},"file":{"path":"articles/服务器开发案例实战/从零实现一个邮件收发客户端.md","mtime":"2020-10-02T13:50:52.061Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-10-09T15:31:57.905Z"},"basePath":"../..","book":{"language":""}});
		});
	</script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-chapter-fold/chapter-fold.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-hide-element/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-theme-fexa/fexa.js"></script>
        
    

    </body>
</html>

